interface Chain {
    [toStringTag]: string;
    body: ((body) => Chain);
    cookies: ((query) => Chain);
    delete: ((url) => Chain);
    get: ((url) => Chain);
    head: ((url) => Chain);
    headers: ((headers) => Chain);
    options: ((url) => Chain);
    patch: ((url) => Chain);
    payload: ((payload) => Chain);
    post: ((url) => Chain);
    put: ((url) => Chain);
    query: ((query) => Chain);
    trace: ((url) => Chain);
    catch<TResult>(onrejected?): Promise<Response | TResult>;
    end(): Promise<Response>;
    end(callback): void;
    finally(onfinally?): Promise<Response>;
    then<TResult1, TResult2>(onfulfilled?, onrejected?): Promise<TResult1 | TResult2>;
}

Hierarchy

Properties

[toStringTag]: string
body: ((body) => Chain)

Type declaration

cookies: ((query) => Chain)

Type declaration

    • (query): Chain
    • Parameters

      • query: object

      Returns Chain

delete: ((url) => Chain)

Type declaration

get: ((url) => Chain)

Type declaration

head: ((url) => Chain)

Type declaration

headers: ((headers) => Chain)

Type declaration

options: ((url) => Chain)

Type declaration

patch: ((url) => Chain)

Type declaration

payload: ((payload) => Chain)

Type declaration

post: ((url) => Chain)

Type declaration

put: ((url) => Chain)

Type declaration

query: ((query) => Chain)

Type declaration

    • (query): Chain
    • Parameters

      • query: string | {
            [k: string]: string | string[];
        }

      Returns Chain

trace: ((url) => Chain)

Type declaration

Methods

  • Attaches a callback for only the rejection of the Promise.

    Type Parameters

    • TResult = never

    Parameters

    • Optional onrejected: null | ((reason) => TResult | PromiseLike<TResult>)

      The callback to execute when the Promise is rejected.

    Returns Promise<Response | TResult>

    A Promise for the completion of the callback.

  • Returns Promise<Response>

  • Parameters

    Returns void

  • Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The resolved value cannot be modified from the callback.

    Parameters

    • Optional onfinally: null | (() => void)

      The callback to execute when the Promise is settled (fulfilled or rejected).

    Returns Promise<Response>

    A Promise for the completion of the callback.

  • Attaches callbacks for the resolution and/or rejection of the Promise.

    Type Parameters

    Parameters

    Returns Promise<TResult1 | TResult2>

    A Promise for the completion of which ever callback is executed.