mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
docs(api.md): clarification note on request interception (#3042)
Fixes #3040.
This commit is contained in:
parent
735e17e223
commit
608f5b79fe
@ -1486,7 +1486,9 @@ The extra HTTP headers will be sent with every request the page initiates.
|
|||||||
Activating request interception enables `request.abort`, `request.continue` and
|
Activating request interception enables `request.abort`, `request.continue` and
|
||||||
`request.respond` methods. This provides the capability to modify network requests that are made by a page.
|
`request.respond` methods. This provides the capability to modify network requests that are made by a page.
|
||||||
|
|
||||||
|
Once request interception is enabled, every request will stall unless it's continued, responded or aborted.
|
||||||
An example of a naïve request interceptor that aborts all image requests:
|
An example of a naïve request interceptor that aborts all image requests:
|
||||||
|
|
||||||
```js
|
```js
|
||||||
const puppeteer = require('puppeteer');
|
const puppeteer = require('puppeteer');
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user