Class Gaxios (6.5.0)

Package

gaxios

Constructors

(constructor)(defaults)

constructor(defaults?: GaxiosOptions);

The Gaxios class is responsible for making HTTP requests.

Parameter
NameDescription
defaults GaxiosOptions

The default set of options to be used for this instance.

Properties

agentCache

protected agentCache: Map<string | URL, 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
NameDescription
opts GaxiosOptions

Set of HTTP options that will be used for this HTTP request.

Returns
TypeDescription
GaxiosPromise<T>
Type Parameter
NameDescription
T

request(opts)

request<T = any>(opts?: GaxiosOptions): GaxiosPromise<T>;

Perform an HTTP request with the given options.

Parameter
NameDescription
opts GaxiosOptions

Set of HTTP options that will be used for this HTTP request.

Returns
TypeDescription
GaxiosPromise<T>
Type Parameter
NameDescription
T