@launchdarkly/js-client-sdk-common - v1.35.0
    Preparing search index...

    Interface Headers

    Interface for headers that are part of a fetch response.

    interface Headers {
        entries(): Iterable<[string, string]>;
        forEach?(callback: (value: string, key: string) => void): void;
        get(name: string): string | null;
        has(name: string): boolean;
        keys(): Iterable<string>;
        values(): Iterable<string>;
    }
    Index
    • Executes the callback once for each header, with the value first. Optional so existing implementations remain valid. The streaming client reads response headers through this method, or through Headers.entries when this method is absent.

      https://developer.mozilla.org/en-US/docs/Web/API/Headers/forEach

      Parameters

      • callback: (value: string, key: string) => void

      Returns void

    • Returns true if the header is present.

      Parameters

      • name: string

        The name of the header to check.

      Returns boolean