Class Gaxios (6.5.0)

Package

gaxios

Constructors

(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 
  
 | 
  
 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
Name
Description
opts
GaxiosOptions

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

Returns
Type
Description
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
Type Parameter
Name
Description
T
Create a Mobile Website
View Site in Mobile | Classic
Share by: