yusenthebot

body-parser

Node.js body parsing middleware. Use when: JSON body parser; Text body parser; URL-encoded form body parser. NOT for: client-side browser applications; static file serving without a server.

yusenthebot 0 Updated 3mo ago
GitHub

Install

npx skillscat add yusenthebot/skills-pack/body-parser

Install via the SkillsCat registry.

SKILL.md

body-parser

Overview

Node.js body parsing middleware. Parse incoming request bodies in a middleware before your handlers, available under the req.body property.

Installation

npm install body-parser

Core API / Usage

$ npm install body-parser
const bodyParser = require('body-parser')

Common Patterns

Key Features

  • multiparty and
  • JSON body parser
  • Raw body parser
  • Text body parser

Example

const bodyParser = require('body-parser')

Configuration

See the official documentation for configuration options and advanced settings.

Tips & Gotchas

  • Current version: 2.2.2. Check the changelog when upgrading across major versions.
  • Refer to the official npm page for edge cases and advanced configuration.