Type Alias: FetchInterceptors
FetchInterceptors =
object
Defined in: packages/fetch/src/types.ts:249
All valid interceptors for fetch requests are:
- error,
- request
- response
- result.
An interceptor can be any of the following:
- synchronous function
- synchronous function that returns a promise (or sometimes returns a promise)
- asynchronous functions
An interceptor can return:
- undefined (void/no return): plain interceptor that does other stuff but does not transform
- value: act as a transformer. Returned value depends on the type of interceptor.
- promise resolves with (1) value or (2) undefined
PS:
- Any exception thrown by interceptors will gracefully ignored.
- Interceptors will be executed in the sequence they're given.
- Execution priority: global interceprors will always be executed before local interceptors.
More info & examples:
See the following for more details and examples:
error: FetchInterceptorErrorrequest: FetchInterceptorRequestresponse: FetchInterceptorResponseresult: FetchInterceptorResult
Properties
error?
optionalerror:FetchInterceptorError[]
Defined in: packages/fetch/src/types.ts:250
request?
optionalrequest:FetchInterceptorRequest[]
Defined in: packages/fetch/src/types.ts:251
response?
optionalresponse:FetchInterceptorResponse[]
Defined in: packages/fetch/src/types.ts:252
result?
optionalresult:FetchInterceptorResult[]
Defined in: packages/fetch/src/types.ts:253