Skip to content

A very simple http request body parser for Express. (That won't fail on invalid request-encoding header...)

License

Notifications You must be signed in to change notification settings

scriptabuild/bodyparser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bodyparser

A very simple http request body parser. (That won't fail on invalid request-encoding header...)

Get it from npm

npm install --save @aeinbu/bodyparser

How to use with express web server

const bodyparser = require("@aeinbu/bodyparser");

// set up express
// ...

app.post("somepage",
	bodyparser.raw(),
	function(req, resp){
		// The raw body data is avaliable as req.body
		// ...
	});

app.post("otherpage",
	bodyparser.json(),
	function(req, resp){
		// The body json data is avaliable as req.body
		// ...
	});

About

A very simple http request body parser for Express. (That won't fail on invalid request-encoding header...)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published