The options to construct the class.
Protected
Readonly
_apiThe configuration of the API it uses.
Protected
Readonly
_httpThe service that makes the requests to the API.
Protected
Readonly
_HTTPErrorThe class to generate possible errors in the requests.
The configuration for the API.
Protected
_getProtected
formatGenerates an _HTTPError from the response of a failed request.
The response from the failed request.
The status code of the response.
An API client for the application to use. What makes this service special is that it formats received errors using the _HTTPError class, and as fetch client, it uses the HTTP service, allowing the application to to internally handle all the requests and responses.
The only reason to use the class directly is if you want to subclass it, as you would normally just register the apiClientProvider.