Open ruslantalpa opened 1 year ago
body-parser 2.x used in express 5 changed how it checks if the post body was read to this: https://github.com/jshttp/on-finished/blob/master/index.js#L76
At the same time, serverless-http is setting the body to a buffer. Also, on this line it's saying the body is not readable https://github.com/dougmoscrop/serverless-http/blob/master/lib/request.js#L9
because of this, body-parser middleware does not get executed.
If in request.js readable is changed to true, everything is working. Maybe that should be changed to:
readable: Buffer.isBuffer(body)
Thank you
Thanks I will look in to this
Facing same issue. slsHttp is returning Buffer as a body instead of JSON.
slsHttp
body-parser 2.x used in express 5 changed how it checks if the post body was read to this: https://github.com/jshttp/on-finished/blob/master/index.js#L76
At the same time, serverless-http is setting the body to a buffer. Also, on this line it's saying the body is not readable https://github.com/dougmoscrop/serverless-http/blob/master/lib/request.js#L9
because of this, body-parser middleware does not get executed.
If in request.js readable is changed to true, everything is working. Maybe that should be changed to:
Thank you