Skip to main content
Version: 1.x.x

Client


Introduction

Client is a function that is responsible for communication with the server. The default client is used to communicate with the REST server. However, there is nothing to prevent you from changing this and creating the client you need. Thanks to event communication, you can set your own client as you wish.

By default, the client is responsible for requests, but its role is very significant for many other elements – such as tracking the progress of requests, listening for cancellation, and mapping payloads and headers. It also applies to all the interceptors in the requesting lifecycle.

caution

If there is no XHR in the window object or the XHR object is a polyfill in your environment, you’ll have to install the npm package xmlhttprequest and set it on the window object.


Preview

fetchClient(command, requestId)


Purpose

  • Requests handler for builder dispatchers
  • Provides flexibility via handler changeability