Constructors

Methods

  • Returns middleware that only parses json and only looks at requests where the Content-Type header matches the type option.

    Parameters

    • Optionaloptions: OptionsJson

      json body parser options

    Returns RequestHandler<ParamsDictionary, any, any, ParsedQs, Record<string, any>>

  • Returns middleware that parses all bodies as a Buffer and only looks at requests where the Content-Type header matches the type option.

    Parameters

    • Optionaloptions: Options

      body parser options

    Returns RequestHandler<ParamsDictionary, any, any, ParsedQs, Record<string, any>>

  • Returns middleware that parses all bodies as a string and only looks at requests where the Content-Type header matches the type option.

    Parameters

    • Optionaloptions: OptionsText

      text body parser options

    Returns RequestHandler<ParamsDictionary, any, any, ParsedQs, Record<string, any>>

  • Returns middleware that only parses urlencoded bodies and only looks at requests where the Content-Type header matches the type option

    Parameters

    • Optionaloptions: OptionsUrlencoded

      url encoded body parser options

    Returns RequestHandler<ParamsDictionary, any, any, ParsedQs, Record<string, any>>