This patch makes sure that request.text() doesn't try
to fetch response body from the backend until the request is
actually finished (finished or failed).
It turns out we're not receiving 'Network.requestWillBeSent' event
for every requestId.
This patch makes sure we don't dispatch `requestfinished` and
`requestfailed` events without passing actual request.
References #168
The Body class was inlined in the Request and Response classes.
This patch:
- removes the Body class
- adds Request.postData public property
- adds Response.buffer(), Response.text() and Response.json() methods
Fixes#106.
This patch:
- removes Body.arrayBuffer. This method is redundant since there's
already a Body.buffer() method
- removes Body.bodyUsed getter.
References #106
This patch:
- renames page.setHTTPHeaders into page.setExtraHTTPHeaders
- starts using Map instead of Object to align with other headers
arguments
Fixes#112.
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 the InterceptedRequest.isHandled method. There's
always a single request interceptor who owns all the intercepted
requests and who know if they were handled.
References #115.
This patch:
- drops Request dependency on NetworkManager
- drops Response dependency on NetworkManager
- drops requestIds from Request and Response objects
This patch implements NetworkManager, which encapsulates all the
interaction with Network domain.
The NetworkManager also uses partial implementation of Request and
Response classes, defined in the Fetch API specification.
References #26