rest-vir - v2.2.0
    Preparing search index...

    Function readHeaderValue

    • Reads a header's values with key case-insensitivity. Always returns an array: empty if the header is absent or explicitly undefined, a single-element array for single-valued headers, and the full list for multi-valued ones (e.g. Set-Cookie). Numeric values (as node:http's OutgoingHttpHeader permits for e.g. content-length) are stringified.

      Parameters

      • headers: Readonly<Record<string, string | number | ReadonlyArray<string> | undefined>>
      • key: string

      Returns readonly string[]