You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 11, 2022. It is now read-only.
The buffer is hex for the POST body I'm sending. I don't see a body parser needed in the examples. this line seems to take care of parsing the JSON.
How to get req.body?
Here's my workaround:
JsonRoutes.add('post', '/api/hooks', function(req, res, next) {
// Access Control
var accessToken = findAccessToken(req);
// Fix for missing body
if (_.isEmpty(req.body)) req.body = JSON.parse(req._readableState.buffer.toString('utf8'));
//...
Thanks!
The text was updated successfully, but these errors were encountered:
MichaelJCole
changed the title
req.body = {} even though req._readableState.buffer = the yummy data
req.body = {} even though req._readableState.buffer = the yummy data
Sep 7, 2017
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hi, I'm unable to get
req.body
in my routes correctly.In the console I get a very long
req
, but towards the top this:The buffer is hex for the POST body I'm sending. I don't see a body parser needed in the examples. this line seems to take care of parsing the JSON.
How to get req.body?
Here's my workaround:
Thanks!
The text was updated successfully, but these errors were encountered: