HTTP Client
The @airyhq/http-client package contains a client for making requests to Airy Core API's HTTP endpoints.
The client works both in the browser and Node.js.
#
InstallationInstall the npm package via npm or yarn.
or
#
Initialize the clientThe library exports an HttpClient
class with public methods that make requests to the Airy Core API.
To get started, instantiate the HttpClient
class with your API host URL:
#
Call a methodEach method makes an HTTP request to the Airy Core API and returns a Promise, which resolves with the response data, or rejects with an error.
Some methods require a request payload object passed as an argument: refer to HTTP endpoints' documentation to learn more.