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?   OptionsJson (Optional) Options for json parser
raw?   Options (Optional) Options for raw parser
text?   OptionsText (Optional) Options for text parser
urlencoded?   OptionsUrlencoded (Optional) Options for urlencoded parser
validation?   ValidationOptions (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.