Whenever the page sends a request, such as for a network resource, the following events are emitted by Puppeteer's `page`:
-`request`: emitted when the request is issued by the page. - `requestfinished` - emitted when the response body is downloaded and the request is complete.
If request fails at some point, then instead of `requestfinished` event the `requestfailed` event is emitted.
All of these events provide an instance of `HTTPRequest` representing the request that occurred:
```
page.on('request', request => ...)
```
NOTE: HTTP Error responses, such as 404 or 503, are still successful responses from HTTP standpoint, so request will complete with `requestfinished` event.
If request gets a 'redirect' response, the request is successfully finished with the `requestfinished` event, and a new request is issued to a redirected url.
The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the `HTTPRequest` class.
Adds an async request handler to the processing queue. Deferred handlers are not guaranteed to execute in any particular order, but they are guaranteed to resolve before the request interception is finalized.
True when the request has POST data. Note that [HTTPRequest.postData()](./puppeteer.httprequest.postdata.md) might still be undefined when this flag is true when the data is too long or not readily available in the decoded form. In that case, use [HTTPRequest.fetchPostData()](./puppeteer.httprequest.fetchpostdata.md).
</td></tr>
<tr><td>
[headers()](./puppeteer.httprequest.headers.md)
</td><td>
</td><td>
An object with HTTP headers associated with the request. All header names are lower-case.