@shopify/oxygen-workers-types
    Preparing search index...

    Interface Request<CfHostMetadata, Cf>

    This Fetch API interface represents a resource request.

    MDN Reference

    interface Request<CfHostMetadata = unknown, Cf = any> {
        cf: undefined | Cf;
        headers: Headers;
        integrity: string;
        keepalive: boolean;
        method: string;
        redirect: string;
        signal: AbortSignal;
        url: string;
        get body(): null | ReadableStream<any>;
        get bodyUsed(): boolean;
        arrayBuffer(): Promise<ArrayBuffer>;
        blob(): Promise<Blob>;
        bytes(): Promise<Uint8Array<ArrayBufferLike>>;
        clone(): Request<CfHostMetadata, Cf>;
        formData(): Promise<FormData>;
        json<T>(): Promise<T>;
        text(): Promise<string>;
    }

    Type Parameters

    • CfHostMetadata = unknown
    • Cf = any

    Hierarchy (View Summary)

    Index

    Properties

    cf: undefined | Cf
    headers: Headers

    Returns a Headers object consisting of the headers associated with request. Note that headers added in the network layer by the user agent will not be accounted for in this object, e.g., the "Host" header.

    MDN Reference

    integrity: string

    Returns request's subresource integrity metadata, which is a cryptographic hash of the resource being fetched. Its value consists of multiple hashes separated by whitespace. [SRI]

    MDN Reference

    keepalive: boolean

    Returns a boolean indicating whether or not request can outlive the global in which it was created.

    MDN Reference

    method: string

    Returns request's HTTP method, which is "GET" by default.

    MDN Reference

    redirect: string

    Returns the redirect mode associated with request, which is a string indicating how redirects for the request will be handled during fetching. A request will follow redirects by default.

    MDN Reference

    signal: AbortSignal

    Returns the signal associated with request, which is an AbortSignal object indicating whether or not request has been aborted, and its abort event handler.

    MDN Reference

    url: string

    Returns the URL of request as a string.

    MDN Reference

    Accessors

    • get bodyUsed(): boolean

      Returns boolean

    Methods

    • Returns Promise<ArrayBuffer>

    • Returns Promise<Uint8Array<ArrayBufferLike>>

    • Type Parameters

      • T

      Returns Promise<T>

    • Returns Promise<string>