# Slim 4 - Get JSON Body

**URL:** <https://discourse.slimframework.com/t/slim-4-get-json-body/3430>\
**Category:** Questions\
**Created:** [September 4, 2019, 8:13pm UTC](https://discourse.slimframework.com/t/slim-4-get-json-body/3430 "2019-09-04T20:13:58Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ino](https://avatars.discourse-cdn.com/v4/letter/i/bbe5ce/32.png) [@ino](https://discourse.slimframework.com/u/ino)\
**Post date:** [September 4, 2019, 8:13pm UTC](https://discourse.slimframework.com/t/slim-4-get-json-body/3430/1 "2019-09-04T20:13:59Z")

</div>

Hi,

what is the best way to get the body in JSON data format?

I’m sending with postman a request to my api which is build with slim 4 with the following content:  
{  
“message”: “test message”  
}

and Content-Type: application/json

If I’m reading the body with $request-\>getParsedBody() it’s null. Any idea what would be the problem?

Thanks in advance

---

<div class="post-metadata">

**Author:** ![Antnee](https://avatars.discourse-cdn.com/v4/letter/a/919ad9/32.png) [@Antnee](https://discourse.slimframework.com/u/Antnee)\
**Post date:** [September 4, 2019, 8:23pm UTC](https://discourse.slimframework.com/t/slim-4-get-json-body/3430/2 "2019-09-04T20:23:20Z")

</div>

Hi @ino, welcome! 👋

I would recommend that you take a look at this blog post, literally posted earlier today: [https://akrabat.com/receiving-input-into-a-slim-4-application/](https://akrabat.com/receiving-input-into-a-slim-4-application/)
