Tuesday, 5 March 2019

Reading data from simple POST request (why request.body is empty?)

I have an express server.I want to read the data (body) that I receive from a post message.​When I'm not using any middleware, the request.body of the app.post is undefined.​I previously did some work with nodejs servers and I always used defined headers with the correct middleware, but now I want to read the raw data.​Why I can't read the data straight up for the box? It is a part of the post message (If I can see the headers, why not the body?)How can I read the request.body? What module I should use?​​

Submitted March 05, 2019 at 12:00PM by sheldonzy

No comments:

Post a Comment