Interface Request

Hierarchy

  • Request

Properties

baseUrl: string
body: any
cookies: any
fullApiPath: string
fullPath: string
hostname: string
ip: string
ips: string[]
method: string
originalUrl: string
params: any
path: string
protocol: string
query: ParsedQs
secure: boolean
signedCookies: any
subdomains: string[]
xhr: boolean

Methods

  • Checks if the specified content types are acceptable, based on the request’s Accept HTTP header field. The method returns the best match, or if none of the specified content types is acceptable, returns false (in which case, the application should respond with 406 "Not Acceptable").

    The type value may be a single MIME type string (such as “application/json”), an extension name such as “json”, a comma-delimited list, or an array. For a list or array, the method returns the best match (if any).

    Returns string[]

  • Checks if the specified content types are acceptable, based on the request’s Accept HTTP header field. The method returns the best match, or if none of the specified content types is acceptable, returns false (in which case, the application should respond with 406 "Not Acceptable").

    The type value may be a single MIME type string (such as “application/json”), an extension name such as “json”, a comma-delimited list, or an array. For a list or array, the method returns the best match (if any).

    Parameters

    • type: string | string[]

    Returns string | false

  • Returns the first accepted charset of the specified character sets, based on the request’s Accept-Charset HTTP header field. If none of the specified charsets is accepted, returns false.

    For more information, or if you have issues or concerns, see accepts.

    Returns string[]

  • Returns the first accepted charset of the specified character sets, based on the request’s Accept-Charset HTTP header field. If none of the specified charsets is accepted, returns false.

    For more information, or if you have issues or concerns, see accepts.

    Parameters

    • charset: string | string[]

    Returns string | false

  • Returns the first accepted encoding of the specified encodings, based on the request’s Accept-Encoding HTTP header field. If none of the specified encodings is accepted, returns false.

    For more information, or if you have issues or concerns, see accepts.

    Returns string[]

  • Returns the first accepted encoding of the specified encodings, based on the request’s Accept-Encoding HTTP header field. If none of the specified encodings is accepted, returns false.

    For more information, or if you have issues or concerns, see accepts.

    Parameters

    • encoding: string | string[]

    Returns string | false

  • Returns the first accepted language of the specified languages, based on the request’s Accept-Language HTTP header field. If none of the specified languages is accepted, returns false.

    For more information, or if you have issues or concerns, see accepts.

    Returns string[]

  • Returns the first accepted language of the specified languages, based on the request’s Accept-Language HTTP header field. If none of the specified languages is accepted, returns false.

    For more information, or if you have issues or concerns, see accepts.

    Parameters

    • lang: string | string[]

    Returns string | false

  • Parameters

    • field: string

      The header field name.

    Returns undefined | string

    • The header field value.
  • Parameters

    • field: string

      The header field name.

    Returns string

    • The header field value.
  • Parameters

    • type: string | string[]

    Returns null | string | false

    • The header field value.

Generated using TypeDoc