Function setFetchOptions

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

    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

    Returns

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

    Related

    getFetchOptions

    Parameters

    • ops: RequestInit

    Returns RequestInit

Generated using TypeDoc