Options
All
  • Public
  • Public/Protected
  • All
Menu

Class MIMEHeader

Hierarchy

  • MIMEHeader

Implements

Index

Properties

Static Readonly DEFAULT_WEIGHT

DEFAULT_WEIGHT: number

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

Methods

component

  • component(): string
  • Gets the parsed component part of the MIME. This is the string between the beginning and the first '/' of the MIME

    Returns string

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

subComponent

  • subComponent(): string
  • Gets the parsed subcomponent part of the MIME. This is the string between the first '/' and the ';' or the end of the MIME

    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