@tripathirajan/fetcher - v1.0.2
    Preparing search index...

    Interface FetchTransportOptions

    Options for the Fetch transport. This interface defines the options for making HTTP requests using the Fetch API. It includes the URL, request configuration, optional timeout, retries, and a callback for download progress.

    interface FetchTransportOptions {
        config: RequestInit;
        onDownloadProgress?: (loaded: number, total: null | number) => void;
        retries?: number;
        timeout?: number;
        url: string;
    }
    Index

    Properties

    config: RequestInit

    The configuration for the request, extending RequestInit. This includes method, headers, body, and other options.

    { method: 'GET', headers: { 'Content-Type': 'application/json' } }
    @public
    onDownloadProgress?: (loaded: number, total: null | number) => void

    Callback function to track download progress. This function will be called with the number of bytes loaded and the total size of the response.

    retries?: number

    Number of times to retry the request if it fails. If set, the request will be retried this many times before failing.

    0 (no retries)
    @public
    timeout?: number

    Optional timeout for the request in milliseconds. If set, the request will be aborted if it takes longer than this time.

    6000 (6 seconds)
    @public
    url: string

    The URL for the request. This is the endpoint to which the request will be sent. It can be a full URL or a relative path if a base URL is set in the FetcherConfig.

    'https://api.example.com/data'
    @public