edgeport - v1.0.3
    Preparing search index...

    Class SipHeaders

    An ordered, case-insensitive multimap of SIP headers.

    Names are canonicalized (compact forms expanded, known headers title-cased) so lookups are name-insensitive while serialization stays tidy. A header may repeat (Via, Route, ...), so getAll returns every value in insertion order and get returns the first.

    1.0.3

    Index
    • Appends a header (does not replace an existing one of the same name).

      Parameters

      • name: string

        Header name (compact forms accepted).

      • value: string

        Header value.

      Returns this

      This instance, for chaining.

    • Removes all values of a header.

      Parameters

      • name: string

        Header name.

      Returns this

      This instance, for chaining.

    • Returns the ordered [name, value] entries (canonical names).

      Returns [string, string][]

    • Returns the first value of a header, or undefined.

      Parameters

      • name: string

        Header name (case-insensitive, compact accepted).

      Returns string | undefined

      The first value, or undefined if absent.

    • Returns every value of a header in order.

      Parameters

      • name: string

        Header name (case-insensitive, compact accepted).

      Returns string[]

      All values (empty array if absent).

    • Whether a header is present.

      Parameters

      • name: string

        Header name.

      Returns boolean

      True if at least one value exists.

    • Sets a header, removing any existing values of the same name first.

      Parameters

      • name: string

        Header name (compact forms accepted).

      • value: string

        Header value.

      Returns this

      This instance, for chaining.