-
-
Notifications
You must be signed in to change notification settings - Fork 57
Description
There is an asymmetry between interceptors in the http-client module and the http-fetch module.
The http-fetch module has the option to short-circuit the request/response process using an interceptor. You can return a Response object (or a Promise<Response>) from a request interceptor method and the fetch module will simply treat that response as the result of the process and switch directly to the response half of the pipeline (chain) without actually making any network calls.
This functionality is missing from the equivalent http-client module. This is clearly an unintentional asymmetry - and a feature that I will find very useful when writing a request batching plugin. It also looks to be only a couple of lines to change, so I intend to offer a pull request.