06-30-2015 03:38
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

06-30-2015 03:38
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
I've set up a subscription, tested my endpoint and all is well. However when I receive a notification of an update to my endpoint the body of the request is blank. I have set the subscription to json body and have also tested with json file as the data type and I still receive no content in the notification other than the header.
I'm responding with 204 in roughly 300ms each time.
Any idea what could be causing a blank notification body?
Answered! Go to the Best Answer.

- Labels:
-
Subscriptions API
Accepted Solutions
07-03-2015 01:45
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

07-03-2015 01:45
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Thanks Samurai Dev. I solved this yesterday as well - I think it was a similar issue.
For future reference for anyone else remember that when receiving a post in express (nodejs) you need to parse the body if it is in json before you can access it.

06-30-2015 12:33
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

06-30-2015 12:33
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Having this problem at the moment as well. $_POST, $_GET and $_FILES are all empty and I have my subscriber set to JSON Body. I get notifications, and the "subscriber stats" page shows that the "payload" for each of the requests is atleast 100 bytes, suggesting that there's SOMETHING there, but I can't find anything.

07-01-2015 01:41
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

07-01-2015 01:41
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Have you tried logging the header to see if that's correct? I get the header I'm expecting but the body is missing still - the header could easily account for 100 bytes...

07-02-2015 09:04
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

07-02-2015 09:04
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
The header seems to be fine; the reported size on the subscriber details page varies but the header stays the same size, suggesting that it's describing the body content, which for us is blank.

07-02-2015 10:27
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

07-02-2015 10:27
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
- Who Voted for this post?
I found out how to get the body, though I'm using PHP so it may or may not apply to you:
$contents = @file_get_contents('php://input');
$_POST, $_GET, $_FILES and $_REQUEST were all blank, but the above had what I was looking for. json_decode'd it to get an array of update objects.
07-03-2015 01:45
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

07-03-2015 01:45
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Thanks Samurai Dev. I solved this yesterday as well - I think it was a similar issue.
For future reference for anyone else remember that when receiving a post in express (nodejs) you need to parse the body if it is in json before you can access it.

04-19-2017 15:28
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

04-19-2017 15:28
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Thanks so much for this. I spend hours looking for the data....

