Interface MhtmlHeaders

class for storing headers parse from MHTML

Tries to somewhat mimic the behavior of the fetch-api Headers object, with some differences, notably that it does no validation.

Hierarchy

  • Iterable<[string, string]>
    • MhtmlHeaders

Methods

  • Returns Iterator<[string, string], any, undefined>

  • add a key-value pair

    If key is already present it will be appended.

    Parameters

    • key: string
    • value: string

    Returns void

  • iterate over all key-value pairs

    Multiple values for the same key will be joined in the order they were added by delim.

    Parameters

    • Optional delim: string

    Returns IterableIterator<[string, string]>

  • iterate over all key-value pairs

    Multiple values for the same key will get iterated in the order they were added.

    Returns IterableIterator<[string, string]>

  • get the value for a key

    If the key is missing, null will be returned, if multiple values for the key are present, they will be joined be delim.

    Parameters

    • key: string
    • Optional delim: string

    Returns null | string

  • get all values for a key

    Parameters

    • key: string

    Returns string[]

  • whether key has any values associated with it

    Parameters

    • key: string

    Returns boolean

  • all keys with at least one value

    Returns Iterable<string>

  • iterate over all values

    If a key has multiple values they will be joined by delim.

    Parameters

    • Optional delim: string

    Returns IterableIterator<string>

  • iterate over all values added

    Returns IterableIterator<string>

Generated using TypeDoc