-
Notifications
You must be signed in to change notification settings - Fork 9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Don't use browser Request api, make our own simple one #106
Comments
What exactly would this kind of API look like? I think not using the built in browser systems where available is harmful. As then developers need to learn yet-another-syntax to get the same results. Even though we already have (and are probably using) exactly what they know underneath. |
We'll get rid of
The API in question is consumed by node.js, not by browser. We don't have fetch api in node. We have protocol's network domain which we expose via the puppeteer's request and puppeteer's response classes. Browser also has Request and Response classes, so we tried to align puppeteer's request and response with the browser counterparts. It turned out that:
Since we failed to implement browser api to a reasonable extend, we don't want to commit to it any more. |
Ah, thanks for the clarification @aslushnikov. Knowing that it SGTM to make this change. |
This patch removes Header class and substitutes it with a simple Map object. The map is chosen over the vanilla object since it has explicit order of headers which we'd like to preserve. References #106.
This patch: - removes Body.arrayBuffer. This method is redundant since there's already a Body.buffer() method - removes Body.bodyUsed getter. References #106
@aslushnikov can you fill in why? I just have it in my notes that we should do it.
The text was updated successfully, but these errors were encountered: