Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ParsedHeaderValue

Hierarchy

  • ParsedHeaderValue

Implements

Implemented by

Index

Properties

Static Readonly DEFAULT_WEIGHT

DEFAULT_WEIGHT: number

If no "q" parameter is present, the default weight is 1.

Methods

isMatchedBy

  • Test if this header is matched by matchTry header

    Parameters

    Returns boolean

isPermitted

  • isPermitted(): boolean
  • Is this an allowed operation as specified by the corresponding header?

    Returns boolean

parameter

  • parameter(key: string): string | null
  • The value of the parameter specified by this key. Each is one of 3 things:

    1. null <- That key was not specified
    2. ParsedHeaderValue.EMPTY (tested using ==) <- The value was not specified
    3. [Other] <- The value of the parameter
    Note: The q parameter is never present.

    Parameters

    • key: string

    Returns string | null

parameters

  • parameters(): {}
  • The parameters specified in this header value. Note: The q parameter is never present.

    Returns {}

    • [key: string]: string

rawValue

  • rawValue(): string
  • Contains the raw value that was received from the user agent

    Returns string

value

  • value(): string
  • Holds the unparsed value of the header.
    For the most part, this is the content before the semi-colon (";")

    Returns string

weight

  • weight(): number
  • Holds the weight specified in the "q" parameter of the header.
    If the parameter is not specified, 1.0 is assumed according to rfc7231

    Returns number

weightedOrder

  • weightedOrder(): number
  • An integer that represents the absolute order position of this header

    Returns number

Generated using TypeDoc