xk6-crawler
    Preparing search index...

    Interface Header

    Represents the key-value pairs in an HTTP header.

    interface Header {
        add(key: string, value: string): void;
        del(key: string): void;
        get(key: string): string;
        keys(): string[];
        set(key: string, value: string): void;
        values(key: string): string[];
    }
    Index

    Methods

    • Adds the key, value pair to the header. It appends to any existing values associated with key.

      Parameters

      • key: string

        key to store

      • value: string

        value to store

      Returns void

    • Deletes the values associated with key.

      Parameters

      • key: string

        key to delete

      Returns void

    • Gets the first value associated with the given key. If there are no values associated with the key, returns empty string.

      Parameters

      • key: string

        key to get

      Returns string

    • Returns all header names.

      Returns string[]

    • Sets the header entries associated with key to the single element value. It replaces any existing values associated with key.

      Parameters

      • key: string

        key to set

      • value: string

        value to set

      Returns void

    • Returns all values associated with the given key.

      Parameters

      • key: string

        key to return

      Returns string[]