Contentful Personalization & Analytics
    Preparing search index...

    Configuration options for createTimeoutFetchMethod.

    interface TimeoutFetchMethodOptions {
        apiName?: string;
        fetchMethod?: FetchMethod;
        onRequestTimeout?: (options: FetchMethodCallbackOptions) => void;
        requestTimeout?: number;
    }

    Hierarchy (View Summary)

    Index

    Properties

    apiName?: string

    Human-readable name of the API being called.

    Used primarily for logging and error messages.

    fetchMethod?: FetchMethod

    Custom fetch implementation to use instead of the global fetch.

    This is useful for providing polyfills, mocks, or instrumented fetch implementations. It is required in runtimes that do not provide globalThis.fetch.

    onRequestTimeout?: (options: FetchMethodCallbackOptions) => void

    Callback invoked when a request exceeds the configured timeout.

    Type Declaration

    If this callback is not provided, a default error is logged.

    requestTimeout?: number

    Maximum time (in milliseconds) to wait for a response before aborting the request.

    3000