Enable interception with await page.setRequestInterception(true), then pass the fields you want to change to request.continue() in the page’s request handler. Puppeteer documents four override fields: headers, method, postData, and url. Every intercepted request must be resolved, so continue requests you do not modify as well.
Enable interception and continue requests
Request continuation options work only after request interception is enabled. Puppeteer says HTTPRequest.continue() throws immediately if interception has not been enabled. Once enabled, a request stalls until it is continued, answered with respond(), aborted, or completed using the browser cache.
As an Amazon Associate I earn from qualifying purchases.
await page.setRequestInterception(true);
page.on('request', request => {
request.continue();
});
The handler above lets requests proceed without overrides. If you install interception for only some requests, your handler still needs to resolve all the others.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Override headers
Start with request.headers() to preserve the existing request headers, then add or replace a property. Puppeteer exposes header names in lower-case.
#1 Best Overall
await page.setRequestInterception(true);
page.on('request', request => {
const headers = {
...request.headers(),
'x-example': 'value',
};
request.continue({ headers });
});
To remove a header, set it to undefined in the headers object:
const headers = {
...request.headers(),
origin: undefined,
};
request.continue({ headers });
Override the URL, method, or body
The continuation override object also accepts url, method, and postData. Each is an optional string property; you can combine them with a headers override.
request.continue({
url: 'https://example.test/replacement-path',
method: 'POST',
postData: 'key=value',
});
Changing url is not a redirect, according to Puppeteer’s ContinueRequestOverrides reference. The override changes the request URL passed along by the browser; do not treat it as a server-side redirect response.
Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minuteWindows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallFilter requests without leaving any stalled
A practical handler checks the request and changes only the matching traffic, while continuing everything else. If other code also handles interception, guard against resolving the same request twice.
Rank #3
await page.setRequestInterception(true);
page.on('request', request => {
if (request.isInterceptResolutionHandled()) {
return;
}
if (request.url().includes('/api/')) {
const headers = {
...request.headers(),
'x-example': 'value',
};
request.continue({ headers });
} else {
request.continue();
}
});
Puppeteer’s Request Interception guide notes that continuation must be called explicitly or a request will hang. The handled-state guard matters when multiple handlers may continue, abort, or respond to the same request.
Use continuation priority when handlers are composed
request.continue() accepts an optional numeric priority after the override object. With cooperative interception, handlers’ resolutions are evaluated using priorities. For an unopinionated continuation, the guide recommends priority 0 or DEFAULT_INTERCEPT_RESOLUTION_PRIORITY. An opinionated continuation can be assigned a priority intended to win over a lower-priority abort or response.
request.continue({ headers }, 0);
Use a priority only when the other handlers’ behavior is known and you need to participate in that priority scheme. Otherwise, use an ordinary continuation and make sure the request is not already resolved.
The Tool Desk
Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Know the request-body inspection caveat
request.postData() can return undefined when the body is too long or is not readily available in decoded form, even if the request has a body. The HTTPRequest class reference points to fetchPostData() for this situation. This is a caveat about reading the original body; the continuation override’s postData property separately accepts a string.
Version context
The Puppeteer documentation references consulted identify HTTPRequest.continue() and Page.setRequestInterception() as version 25.12.0, while the ContinueRequestOverrides interface page is labeled version 25.10.0. Check the API reference matching your installed Puppeteer release when exact version behavior matters.
Troubleshoot common continuation problems
continue()throws immediately: enable interception first withawait page.setRequestInterception(true).- Navigation or page activity appears stuck: look for a request event path that neither continues, responds, nor aborts the request. Interception leaves unresolved requests stalled.
- A request is resolved more than once: multiple handlers may act on it. Check
request.isInterceptResolutionHandled()before resolving, and coordinate handlers’ priorities where cooperative handling is used. - An expected original body is missing:
postData()may be undefined for a long body or one not available in decoded form; use the documentedfetchPostData()path when appropriate. - A URL override does not behave like navigation redirection: it is a changed request URL, not a redirect response.
Or skip the browser setup
If your goal is simply to capture a website rather than alter its network requests inside Puppeteer, ScreenshotNeo provides a one-call screenshot API and an MCP server for AI agents.
Quick Recap
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
See the ScreenshotNeo documentation for request options. Cookie banners, popups, and chat widgets are removed before the shot; bot checks, blank pages, and failed loads are never billed. Its MCP server lets AI agents take screenshots. The free plan includes 1,000 screenshots a month with no card, and paid plans start at $5 for 3,000. Sign up for free.
Free tools Windows power users keep installed
One-click scans. No signup required.
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




