Function setFetchOptions

  • Sets global fetch options for stacks.js network calls.

    Parameters

    • ops: RequestInit

    Returns RequestInit

    global fetch options after merging with previous options (or defaults)

    Example

    Users can change the default referrer as well as other options when fetch is used internally by stacks.js:

    setFetchOptions({ referrer: 'no-referrer', referrerPolicy: 'no-referrer', ...otherRequestOptions });
    

    After calling setFetchOptions all subsequent network calls will use the specified options above.

    See

    MDN Request: https://developer.mozilla.org/en-US/docs/Web/API/Request/Request

    Related

    getFetchOptions

Generated using TypeDoc