Constructor
new FetchInterceptor()
Recognize global environment and attach fetch
Members
hooks
Whitelist hooks
Methods
(static) register(hooks) → {FetchInterceptor}
Register intercept hooks & return an interceptor instance
Parameters:
Name | Type | Description |
---|---|---|
hooks |
object | The intercept hooks |
Returns:
An interceptor object
- Type
- FetchInterceptor
hijack()
Hijack global fetch and insert registered hooks if present
unregister()
Reset fetch and unregister intercept hooks