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

    Interface XhrTransportOptions

    Options for the XHR transport. This interface defines the options for making HTTP requests using XMLHttpRequest. It includes the URL, method, headers, body, timeout, and callbacks for download and upload progress.

    XhrTransportOptions

    { timeout: 6000, credentials: 'same-origin' }
    
    {
    * url: 'https://api.example.com/data',
    * method: 'POST',
    * headers: { 'Content-Type': 'application/json' },
    * body: JSON.stringify({ key: 'value' }),
    * timeout: 6000,
    * onDownloadProgress: (event) => console.log(`Downloaded ${event.loaded} bytes`),
    * onUploadProgress: (event) => console.log(`Uploaded ${event.loaded} bytes`),
    * credentials: 'same-origin'
    * }
    interface XhrTransportOptions {
        body?: null | Document | XMLHttpRequestBodyInit;
        credentials?: RequestCredentials;
        headers?: Record<string, string>;
        method: string;
        onDownloadProgress?: (event: ProgressEvent) => void;
        onUploadProgress?: (event: ProgressEvent) => void;
        timeout?: number;
        url: string;
    }
    Index

    Properties

    body?: null | Document | XMLHttpRequestBodyInit

    The body of the request.

    credentials?: RequestCredentials

    Credentials mode for the request.

    headers?: Record<string, string>

    Headers to include in the request.

    method: string

    The HTTP method for the request (e.g., 'GET', 'POST').

    onDownloadProgress?: (event: ProgressEvent) => void

    Callback for download progress.

    onUploadProgress?: (event: ProgressEvent) => void

    Callback for upload progress.

    timeout?: number

    Optional timeout for the request in milliseconds.

    url: string

    The URL for the request.