You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
As a user of electron, I want to be able to intercept http requests and optionally send a response back. If I don't choose to send a response I want it to be handled by chrome's network stack.
Describe the solution you'd like
I'd like to add a new protocol like interceptFooProtocol that:
Calls into a handler at various points in the request job (at the start of the request, after headers are constructed, when headers are received, etc)
Allows optionally providing a http response for the job
If an http response is not provided, delegates to URLRequestHttpJob in chrome
Describe alternatives you've considered
Use interceptStreamProtocol and use the node network stack
The problem with this is that URLRequestHttpJob does a lot under the hood, and rewriting it in js is possible, but a lot of work. Among other things it adds headers, manages cookies, and checks ssl certs for pinning.
The other problem is that as bugs arise with interceptStreamProtocol it still needs to go through electron to be fixed, vs calling into URLRequestHttpJob and knowing that it will be handled the same as chrome.
Is your feature request related to a problem? Please describe.
As a user of electron, I want to be able to intercept http requests and optionally send a response back. If I don't choose to send a response I want it to be handled by chrome's network stack.
Describe the solution you'd like
I'd like to add a new protocol like interceptFooProtocol that:
URLRequestHttpJob
in chromeDescribe alternatives you've considered
interceptStreamProtocol
and use the node network stackURLRequestHttpJob
does a lot under the hood, and rewriting it in js is possible, but a lot of work. Among other things it adds headers, manages cookies, and checks ssl certs for pinning.URLRequestHttpJob
and knowing that it will be handled the same as chrome.Additional context
The text was updated successfully, but these errors were encountered: