Updating NPM dependencies
This commit is contained in:
32
node_modules/gaxios/README.md
generated
vendored
32
node_modules/gaxios/README.md
generated
vendored
@@ -50,7 +50,14 @@ gaxios.request({url: '/data'}).then(...);
|
||||
// The HTTP methods to be sent with the request.
|
||||
headers: { 'some': 'header' },
|
||||
|
||||
// The data to base64 encode and send in the body of the request.
|
||||
// The data to send in the body of the request. Data objects will be
|
||||
// serialized as JSON.
|
||||
//
|
||||
// Note: if you would like to provide a Content-Type header other than
|
||||
// application/json you you must provide a string or readable stream, rather
|
||||
// than an object:
|
||||
// data: JSON.stringify({some: 'data'})
|
||||
// data: fs.readFile('./some-data.jpeg')
|
||||
data: {
|
||||
some: 'data'
|
||||
},
|
||||
@@ -80,11 +87,14 @@ gaxios.request({url: '/data'}).then(...);
|
||||
timeout: 1000,
|
||||
|
||||
// Optional method to override making the actual HTTP request. Useful
|
||||
// for writing tests.
|
||||
adapter?: (options) => {
|
||||
return {
|
||||
data: 'your data'
|
||||
}
|
||||
// for writing tests and instrumentation
|
||||
adapter?: async (options, defaultAdapter) => {
|
||||
const res = await defaultAdapter(options);
|
||||
res.data = {
|
||||
...res.data,
|
||||
extraProperty: 'your extra property',
|
||||
};
|
||||
return res;
|
||||
};
|
||||
|
||||
// The expected return type of the request. Options are:
|
||||
@@ -107,9 +117,6 @@ gaxios.request({url: '/data'}).then(...);
|
||||
// The number of retries already attempted.
|
||||
currentRetryAttempt?: number;
|
||||
|
||||
// The amount of time to initially delay the retry. Defaults to 100.
|
||||
retryDelay?: number;
|
||||
|
||||
// The HTTP Methods that will be automatically retried.
|
||||
// Defaults to ['GET','PUT','HEAD','OPTIONS','DELETE']
|
||||
httpMethodsToRetry?: string[];
|
||||
@@ -119,13 +126,16 @@ gaxios.request({url: '/data'}).then(...);
|
||||
statusCodesToRetry?: number[][];
|
||||
|
||||
// Function to invoke when a retry attempt is made.
|
||||
onRetryAttempt?: (err: GaxiosError) => void;
|
||||
onRetryAttempt?: (err: GaxiosError) => Promise<void> | void;
|
||||
|
||||
// Function to invoke which determines if you should retry
|
||||
shouldRetry?: (err: GaxiosError) => boolean;
|
||||
shouldRetry?: (err: GaxiosError) => Promise<boolean> | boolean;
|
||||
|
||||
// When there is no response, the number of retries to attempt. Defaults to 2.
|
||||
noResponseRetries?: number;
|
||||
|
||||
// The amount of time to initially delay the retry, in ms. Defaults to 100ms.
|
||||
retryDelay?: number;
|
||||
},
|
||||
|
||||
// Enables default configuration for retries.
|
||||
|
||||
Reference in New Issue
Block a user