ClientOpts: { ammendXhr?: ((xhr: XMLHttpRequest) => void); authentication?: Authentication | Authentication[]; baseUrl?: string; fetch?: typeof fetch }

Basic options passed on the creation of an API client with createApiClient

Type declaration

  • Optional ammendXhr?: ((xhr: XMLHttpRequest) => void)
      • (xhr: XMLHttpRequest): void
      • Maps over all XmlHttpRequests going out from estuary-rpc-client before they are opened, allowing for additional modifications/callbacks

        Parameters

        • xhr: XMLHttpRequest

        Returns void

  • Optional authentication?: Authentication | Authentication[]

    Authentication data to be attatched to XmlHttpRequests

  • Optional baseUrl?: string

    Address the API's URLs are relative to (https://example.com/, or https://example.com/app/); by default the page's document.baseURI. Needed outside a page.

  • Optional fetch?: typeof fetch

    Calls the API with this fetch rather than XMLHttpRequest: in Node, in workers, or wherever the transport needs replacing. Used by default where there's no XMLHttpRequest. (Upload progress needs XMLHttpRequest.)

Generated using TypeDoc