Can we work without Body-parser in Node.js?

+1 vote
I don't understand why we need body-parser in an Express application, as we can get data without it. And what does it do actually and how?
Jun 20 by shubham
• 6,890 points

1 answer to this question.

0 votes

To understand this question you first need to understand, how the request comes to your client

where URL specifies the server where you want to send the request too

The method specifies the HTTP Method like PUT, GET, POST, DELETE

The header provides metadata about your request 

The body says about the information you are requesting for

So when you get a request in this format to separate the body from the request you need body-parser and give it to the req.body


answered Jun 20 by sunshine
• 1,240 points

Related Questions

0 votes
1 answer

how to safely deploy npm install without it causing inconsistencies?

The recent versions on npm generates a ...READ MORE

answered Apr 11, 2018 in DevOps on Cloud by DareDev
• 6,810 points
0 votes
1 answer

Unable to request channel creation using Rest Api

I'd recommend taking a look at the ordering ...READ MORE

answered Jul 16, 2018 in Blockchain by Perry
• 17,020 points
0 votes
1 answer

Why do we use Body-parser in Node.js?

For understanding this first you need to ...READ MORE

answered May 20 in Others by sunshine
• 1,240 points
0 votes
1 answer
0 votes
1 answer

How many bots we can deploy in work fusion free version?

Hi Ranjandude, for a free version of ...READ MORE

answered May 30 in RPA by Abha
• 25,040 points
0 votes
1 answer

How can I include a JavaScript file in another JavaScript file in Node.js?

In Node.js to include a JavaScript file in ...READ MORE

answered Jul 30 by sunshine
• 1,240 points
0 votes
1 answer

is there any way we can run kubectl command without sudo acess in KOPS kubernetes?

Yes, you can use kubectl on kops ...READ MORE

answered Aug 28 in Kubernetes by Adarsh