Base class in Coolio http package, which allows to perform API calls.
▪ T
HttpClient
+ new HttpClient(config
: HttpClientConfig‹T›): HttpClient
Defined in packages/http/src/httpClient.ts:122
Parameters:
Returns: HttpClient
▸ addInterceptor(interceptor
: HttpInterceptor): this
Defined in packages/http/src/httpClient.ts:148
Adds an interceptor to the client. Interceptor can be written either as class or as a function, which may mutate request options and post-process response from server. Multiple interceptors can be added to a single HttpClient. They can perform as:
cache
error handler
authorizer
logger
auto-retry
redirection handler
Parameters:
Returns: this
▸ delete<Body>(uri
: string, options?
: HttpOptions): Promise‹HttpResponse‹Body››
Defined in packages/http/src/httpClient.ts:212
Performs a DELETE request.
Type parameters:
▪ Body: T
Parameters:
Returns: Promise‹HttpResponse‹Body››
▸ get<Body>(uri
: string, options?
: HttpOptions): Promise‹HttpResponse‹Body››
Defined in packages/http/src/httpClient.ts:159
Performs a GET request.
Type parameters:
▪ Body: T
Parameters:
Returns: Promise‹HttpResponse‹Body››
▸ patch<Body>(uri
: string, options?
: HttpOptions): Promise‹HttpResponse‹Body››
Defined in packages/http/src/httpClient.ts:199
Performs a PATCH request.
Type parameters:
▪ Body: T
Parameters:
Returns: Promise‹HttpResponse‹Body››
▸ post<Body>(uri
: string, options?
: HttpOptions): Promise‹HttpResponse‹Body››
Defined in packages/http/src/httpClient.ts:173
Performs a POST request.
Type parameters:
▪ Body: T
Parameters:
Returns: Promise‹HttpResponse‹Body››
▸ put<Body>(uri
: string, options?
: HttpOptions): Promise‹HttpResponse‹Body››
Defined in packages/http/src/httpClient.ts:186
Performs a PUT request.
Type parameters:
▪ Body: T
Parameters:
Returns: Promise‹HttpResponse‹Body››
▸ remove<Body>(uri
: string, options?
: HttpOptions): Promise‹HttpResponse‹any››
Defined in packages/http/src/httpClient.ts:227
Performs a DELETE request.
Type parameters:
▪ Body: T
Parameters:
Returns: Promise‹HttpResponse‹any››
▸ request<Body>(url
: string, options
: HttpRequestOptions): Promise‹HttpResponse‹Body››
Defined in packages/http/src/httpClient.ts:229
Type parameters:
▪ Body: T
Parameters:
Returns: Promise‹HttpResponse‹Body››
Name
Type
config
Name
Type
Description
interceptor
Interceptor that will process every request/response in this HttpClient.
Name
Type
Description
uri
string
Address of HTTP endpoint
options?
Additional HttpOptions passed with request
Name
Type
Description
uri
string
Address of HTTP endpoint
options?
Additional HttpOptions passed with request
Name
Type
Description
uri
string
Address of HTTP endpoint
options?
Additional HttpOptions passed with request
Name
Type
Description
uri
string
Address of HTTP endpoint
options?
Additional HttpOptions passed with request
Name
Type
Description
uri
string
Address of HTTP endpoint
options?
Additional HttpOptions passed with request
Name
Type
Description
uri
string
Address of HTTP endpoint
options?
Additional HttpOptions passed with request
Name
Type
url
string
options