Skip to main content

Browser HTTP transport using fetch API.

  • Blocking request, for legacy code that expects a return value rather than a promise. Uses a synchronous XMLHttpRequest, which browsers still support but have deprecated: it blocks the UI thread. Only reachable when the client was constructed with sync: true, which the standalone build does by default.

    XMLHttpRequest is looked up on globalThis so this file still compiles for the Node build, whose lib does not include the DOM.

    Parameters

    Returns HttpResponse

    Implementation of HttpTransport.requestSync