Page Contents

Home > @loopback/rest > RequestBodyParserOptions

RequestBodyParserOptions interface

Options for request body parsing See https://github.com/expressjs/body-parser/#options

Built-in parsers retrieve their own options from the request body parser options. The parser specific properties override common ones.

Signature:

export interface RequestBodyParserOptions extends Options 

Extends: Options

Properties

Property Modifiers Type Description
[json?](/doc/en/lb4/apidocs.rest.requestbodyparseroptions.json.html) OptionsJson _(Optional)_ Options for json parser
[raw?](/doc/en/lb4/apidocs.rest.requestbodyparseroptions.raw.html) Options _(Optional)_ Options for raw parser
[text?](/doc/en/lb4/apidocs.rest.requestbodyparseroptions.text.html) OptionsText _(Optional)_ Options for text parser
[urlencoded?](/doc/en/lb4/apidocs.rest.requestbodyparseroptions.urlencoded.html) OptionsUrlencoded _(Optional)_ Options for urlencoded parser
[validation?](/doc/en/lb4/apidocs.rest.requestbodyparseroptions.validation.html) [ValidationOptions](/doc/en/lb4/apidocs.rest.validationoptions.html) _(Optional)_ Validation options for AJV, see https://github.com/epoberezkin/ajv\#options This setting is global for all request body parsers and it cannot be overridden inside parser specific properties such as `json` or `text`.