This module wraps body-parser Nodejs module for use into a Protontype project
- JsonBodyParserMiddleware: Equivalent to JSON body parser
- RawBodyParserMiddleware: Equivalent to Raw body parser
- TextBodyParserMiddleware: Equivalent to Text body parser
- UrlBodyParserMiddleware: Equivalent to URL-encoded form body parser
let app = new ProtonApplication().addMiddlewareAs(JsonBodyParserMiddleware)
app.start();With options:
let middlewareWithOptions = new JsonBodyParserMiddleware({ type: 'application/*+json' });
let app = new ProtonApplication().addMiddleware(middleware)
app.start();For all options see:
For how to use middlewares into Protontype see documentation