Conversation
|
After talking in the API WG meeting I'll clarify a few things here for the record: The main goal of my questions in this RFC is to determine API intent. My original PR added a way for users using Question 1My first question is pointed.
If it's meant to be a provider API, that doesn't leave room for passing back to Chromium other than dispatching another request with the same properties and then returning the response from that (the Question 2My second question follows.
If we decide that we don't want deferral semantics (choose not to return a response) inside Question 3
These mostly touch on either use cases I see where users expect Question 4
I purposely avoided pre-flight request modification and post-reception response modification from the deferral path I built in my original PR for improving |
|
To push things forward, a big question I want answered: Do we want to provide a way for users, inside a handler, to decline to return a response at all and let Chromium handle it? I'd vote "yes." And if the answer is "yes", then I'd also argue that the I could potentially be swayed and convinced that (re-)dispatching a requests ends up being functionally identical. However, I've spoken to @deepak1556 and @MarshallOfSound about how the Chromium network stack works, and there doesn't seem to be a consensus on if that is true. We may also want to answer that question. Regardless, I am still an advocate for using the in-flight request, as it makes the most sense to me to achieve what users are expecting the API to behave like. |
This is very much a work-in-progress, but I am opening it up so we have a centralized place to discuss these things that's not my PR.
To briefly give my personal answers to the questions posed:
protocol.handlemeant, by us, to be an middleware-like interception API or a provider API for thehttpsscheme? Not sure, I didn't make it.protocol.handlebe split into two different API's (e.g.protocol.handleandprotocol.intercept)? Splitting might be better, if we want to support more middleware-like features.Set-Cookieheader in a returned response set the cookies? Would be nice in concept, hard to implement (when and where would the API commit to applying the cookies?).webRequesthandlers API? Perhaps deprecated if their behavior can be superseded by any new API?