Hardware FixRecommendedDevice not working? Your driver may be the problemCheck updates for common hardware issues.Fix DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run Scan×
Skip to content
World desk3 min

How to Override Puppeteer Request Continuation Options

Enable Puppeteer request interception, then pass headers, URL, method, or postData overrides to request.continue(). See working patterns, priority guidance, and fixes for stalled or duplicate resolutions.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

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.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

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.

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.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Filter 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.

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.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

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.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

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 with await 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 documented fetchPostData() 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.

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.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

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.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
Windows Errors? Fix Them Before They SpreadFree repair scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.