Optional
Readonly
agent?: HttpAgent | HttpsAgentThe agent to be used for the request.
Optional
Readonly
cacheThe superagent-cache-plugin instance that will be used.
Optional
Readonly
getCall to obtain a cache-safe identifier the currently handled request.
This is used to identify the request when comparing with cached responses so that we can determine if a response was fulfilled from cache or from a fresh request.
Without an implementation of this method, it is not possible to determine if something is from cache or not.
Optional
Readonly
getA callback to calculate when the cached response for a given URL should expire. If this method is omitted, the cache provider's default expiration will be used. The result is given to superagent-cache-plugin and works according to its documentation.
https://github.com/jpodwys/superagent-cache-plugin/tree/02e41c5b98c89318133d4736b2bd1abcc1866bab
Optional
Readonly
isA callback used to determine if a particular URL's result should be cached or not. This defaults to only allowing JS file extensions to be stored. This callback should return null for the default behavior to apply.
Readonly
retries: numberThe number of times a request is retried if it fails from a transient error. This is in addition to the initial request. For example, if this were set to 3, then there could be a total of 4 requests. Note that for all GET requests made during server-side rendering, it is assumed they will be idempotent.
Optional
Readonly
shouldCallback invoked if a retry occurs. This should return null for the default behavior to apply, true to allow the retry, and false to block further retries.
Returning a non-boolean value causes superagent to do its default behavior, which is:
Readonly
timeout: number | TimeoutsTime to wait in milliseconds before a request times out.
Generated using TypeDoc
Options to configure a request.