Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This is designed to support logging network requests. Important use cases include: * Determing if a specific network request occured * Monitoring request performance * Generating a HAR file for offline analysis of requests This does not currently attempt to support network request interception (i.e. mutable access to requests), but the intent is that the same lifecycle events could be used in a blocking way. It also currently only supports HTTP-type requests and not e.g. WebSockets. Some support for integration with service workers is also missing. The typical order of events is network.beforeRequestSent - before request is sent, would later be the right point to change the request headers or body or prevent the request entirely. network.responseStarted - after response headers are received, but before body. Would later be a point to override the response headers or body. network.responseCompleted - after the request is fully complete. network.fetchError - After any error that will prevent the request from completing. Compared to CDP this is missing an event for data being received. Compared to WebExtensions, this is missing an event after the headers are sent but before the data is sent.
- Loading branch information