Package
gaxiosConstructors
(constructor)(defaults)
constructor(defaults?: GaxiosOptions);
The Gaxios class is responsible for making HTTP requests.
Parameter | |
---|---|
Name | Description |
defaults |
GaxiosOptions
The default set of options to be used for this instance. |
Properties
agentCache
protected agentCache: Map<string, Agent | ((parsedUrl: URL) => Agent)>;
defaults
defaults: GaxiosOptions;
Default HTTP options that will be used for every HTTP request.
Methods
_request(opts)
protected _request<T = any>(opts?: GaxiosOptions): GaxiosPromise<T>;
Internal, retryable version of the request
method.
Parameter | |
---|---|
Name | Description |
opts |
GaxiosOptions
Set of HTTP options that will be used for this HTTP request. |
Returns | |
---|---|
Type | Description |
GaxiosPromise<T> |
Type Parameter | |
---|---|
Name | Description |
T |
request(opts)
request<T = any>(opts?: GaxiosOptions): GaxiosPromise<T>;
Perform an HTTP request with the given options.
Parameter | |
---|---|
Name | Description |
opts |
GaxiosOptions
Set of HTTP options that will be used for this HTTP request. |
Returns | |
---|---|
Type | Description |
GaxiosPromise<T> |
Type Parameter | |
---|---|
Name | Description |
T |