Node.js body parsing middleware. Parse incoming request bodies in a middleware before your handlers, available under the req.body property. As req.body's shape is based on user-controlled input, all properties and values in this object are untrusted and should be validated before trusting. For example, req.body.foo.toString() may fail in multiple ways, for example the foo property may not be there or may not be a string, and toString may not be a function and instead a string or other user input. The bodyParser object exposes various factories to create middlewares. All middlewares will populate the req.body property with the parsed body when the Content-Type request header matches the type option, or an empty object ({}) if there was no body to parse, the Content-Type was not matched, or an error occurred.

Features

  • Control the maximum request body size
  • Add a generic JSON and URL-encoded parser as a top-level middleware
  • Add body parsers specifically to the routes that need them
  • Parse the bodies of all incoming requests
  • All the parsers accept a type option which allows you to change the Content-Type that the middleware will parse
  • Change accepted type for parsers

Project Samples

Project Activity

See All Activity >

License

MIT License

Follow body-parser

body-parser Web Site

Other Useful Business Software
Red Hat Enterprise Linux on Microsoft Azure
Red Hat Enterprise Linux on Microsoft Azure Icon
Red Hat Enterprise Linux on Microsoft Azure

Deploy Red Hat Enterprise Linux on Microsoft Azure for a secure, reliable, and scalable cloud environment, fully integrated with Microsoft services.

Red Hat Enterprise Linux (RHEL) on Microsoft Azure provides a secure, reliable, and flexible foundation for your cloud infrastructure. Red Hat Enterprise Linux on Microsoft Azure is ideal for enterprises seeking to enhance their cloud environment with seamless integration, consistent performance, and comprehensive support.
Learn More
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of body-parser!

Additional Project Details

Programming Language

JavaScript

Related Categories

JavaScript Parser Generators

Registered

2021-11-01