Protected ReadonlydepsReadonlylogA string prefix for all log statements made by this target.
The current base options. request may override these values.
Applies the given partial configuration.
Optional ReadonlyretryRetry configuration.
Optional Readonlyretries?: numberThe maximum number of retries for a single request. Default: 1 For requests with side effects, this should be set to 0.
"Various studies have collected data which shows that one max retry is sufficient to achieve 99.999% success. The idea is that a truly transient failure should succeed on the first retry. And if the retry fails then it is likely more than a transient failure and additional retries are exhausting resources in the system for no benefit."
Optional ReadonlyretryIf there is a retry-after header, add the returned amount of time (in seconds) to prevent clustered retry behavior.
Optional ReadonlyretryRetry backoff timing.
Optional Readonlydistribution?: (() => number)The distribution function to randomize request retry timing. This is to prevent all users from making retries at the same time.
Optional Readonlyexponentpow(exponentBase, failureCount)
Optional Readonlyinterval?: numberThe interval in seconds, multiplied by pow(exponentBase, failureCount).
Optional ReadonlymaxThe maximum time to wait between tries, in seconds, regardless of how many consecutive failures.
Optional ReadonlyretryThe number of consecutive failures before retries are no longer attempted, only tries.
Optional ReadonlyshouldGiven the network status code, returns true if the fetch should retry.
Optional ReadonlytryFirst try backoff timing.
Optional Readonlydistribution?: (() => number)The distribution function to randomize request retry timing. This is to prevent all users from making retries at the same time.
Optional Readonlyexponentpow(exponentBase, failureCount)
Optional Readonlyinterval?: numberThe interval in seconds, multiplied by pow(exponentBase, failureCount).
Optional ReadonlymaxThe maximum time to wait between tries, in seconds, regardless of how many consecutive failures.
Optional Readonlytimeout?: numberThe timeout (in seconds) before the request is aborted.
Dispatches an event.
The key of the event within EventMap
If the passed event is read-only, then it may be re-used/cached. Otherwise, it should be a new event object every dispatch. If no target property is set on the event, the target will be set to this host.
Returns true if the event host has any listeners for the given type.
Adds an event handler for the given typed event.
The key representing the event type to listen for.
A callback to invoke when the event with the given type is dispatched.
Optionaloptions: SignalOptionsOptions for changing listening behavior.
Returns a method, when invoked, removes the handler.
Requests a resource.
Note: Unlike window.fetch, the returned promise is expected to reject if the
response is !ok.
Optionalinit: Maybe<Readonly<Omit<RequestInit, "signal">>>OptionalrequestOptions: Maybe<RequestOptions>
A quality of service wrapper to window.fetch. Handles retries, network status, and emits events that may be used in reporting or metrics.