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, 2019 by shubham
• 7,340 points
659 views

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, 2019 by sunshine
• 1,300 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,890 points
1,073 views
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,100 points
980 views
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, 2019 in Others by sunshine
• 1,300 points
8,137 views
0 votes
1 answer

How can we create an HTTPS server in Node.js?

Hii, The Express API doc spells this out pretty clearly. I ...READ MORE

answered Apr 24, 2020 in Java-Script by Niroj
• 82,840 points
926 views
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, 2019 in RPA by Abha
• 28,140 points
882 views
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 31, 2019 by sunshine
• 1,300 points
216 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP