HttpBody parsing class library -- fc body

2021-04-09 22:16:37 / three thousand four hundred and sixty-six / Programming code

HttpBody parsing class library -- fc body

Http request body parsing, support multiple files, support type restrictions, body size restrictions, simple and elegant, fast and efficient


How to install:

 npm install fc-body


How to use:

 //Promise object
const fc_body = require('fc-body');
let body = new fc_body({isAutoSaveFile: true, savePath: __dirname+"/upload"});
let post = '';
http.createServer(async (req,res) => {
try {
post = await body.getBody(req);
console.log(post);
} catch (e) {
console.log(e);
}
});


This is a class library for parsing http body in node. There is only one class and no other dependencies. It is also very convenient to use. Welcome to use it

 Gravatar