Windows 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 reinstallCrashes, 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 minuteUse await response.text() to read a Puppeteer response body as a UTF-8 string. For a page navigation, get the response from page.goto(); for a click-triggered navigation or an arbitrary network response, wait for the relevant response first.
Read the response from page.goto()
page.goto() resolves to an HTTPResponse when navigation produces a response. Call and await its text() method:
As an Amazon Associate I earn from qualifying purchases.
const response = await page.goto('https://example.com');
if (!response) {
throw new Error('Navigation did not produce an HTTP response');
}
const bodyText = await response.text();
console.log(bodyText);
text() is asynchronous: it returns a promise, so await it before using the body. Puppeteer documents the result as a UTF-8 representation and says the method throws if the content is not a UTF-8 string. See the Puppeteer HTTPResponse API reference (version 25.12.0 shown on the reference as of October 3, 2026).
Recommended Free Tools
Check whether a response exists
Some navigations, including navigation to about:blank or to the same URL with only a hash change, can yield null. Check the value before calling text(), as in the example, to avoid trying to read from a missing response. The Page API documentation describes the navigation response behavior.
#1 Best Overall
Read the response after a click or other action
If an action triggers navigation, start waiting for navigation and perform the action together. This avoids clicking first and only then starting to wait, which can miss a fast navigation:
const [response] = await Promise.all([
page.waitForNavigation(),
page.click('a.some-link'),
]);
const bodyText = response ? await response.text() : '';
console.log(bodyText);
Use a selector that matches the link or control in your page. The response can be null for navigation cases that do not produce a new HTTP response; handle that possibility before reading the body. This parallel-wait pattern is documented in the Puppeteer Page API.
Rank #2
Read matching responses from network activity
When you need an API response or another request that is not the main navigation, listen for the Page response event and filter by URL. The event provides an HTTPResponse. Because a body read can fail, keep it inside error handling:
Free tools Windows power users keep installed
One-click scans. No signup required.
page.on('response', async response => {
if (!response.url().includes('/api/items')) return;
try {
const bodyText = await response.text();
console.log(response.status(), bodyText);
} catch (error) {
console.error('Could not read response body', response.url(), error);
}
});
Filtering prevents the handler from trying to print every response on the page. The event’s role and response object are described in the PageEvent documentation.
Rank #3
Choose the right body method
| Method | Use it when | Result or caveat |
|---|---|---|
text() |
You want textual response content. | Resolves to a UTF-8 string; throws if the content is not a UTF-8 string. |
json() |
The body is JSON and you want to use it as data. | Reads the response as JSON. See the HTTPResponse reference. |
buffer() or content() |
You need body data as a Buffer rather than a string. | Returns buffer data. Puppeteer notes that the browser may re-encode body data based on headers or heuristics. See the HTTPResponse reference. |
Interpret the status separately from the body
A response can have an HTTP error status, such as 404 or 503, and still be a completed HTTP response. Check response.status() or response.ok() to determine HTTP success; do not treat a non-2xx status as automatically equivalent to a transport-level requestfailed event. When appropriate, you can still read the response body to inspect the server’s error details.
const response = await page.goto('https://example.com/missing');
if (response) {
console.log('HTTP status:', response.status());
console.log('HTTP success:', response.ok());
console.log('Body:', await response.text());
}
Puppeteer distinguishes HTTP error responses from failed requests in its API documentation; the PageEvent documentation covers the response event.
Rank #4
Troubleshoot response text reads
Cannot read properties of null: the navigation did not yield anHTTPResponse. Check fornullbefore callingtext(); hash-only andabout:blanknavigation are documented examples.- The body read throws: the response body may not be available, or its contents may not be a UTF-8 string. Catch the error when handling arbitrary network responses. If you need bytes, try
buffer()orcontent()instead. - The click navigation is missed: register
waitForNavigation()in the samePromise.all()as the click rather than after it. - The status is 404 or 503: that is an HTTP response status, not proof that the request failed at the transport level. Inspect
status(),ok(), and, when available, the body. - The listener prints unrelated bodies: narrow the
response.url()filter to the endpoint you want. Also catch body-read errors so one unavailable body does not become an unhandled rejection.
Or skip the browser setup
If your goal is a screenshot rather than reading response text, ScreenshotNeo provides a website screenshot API and MCP server. Its one-request API returns a screenshot or PDF, not the response body:
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 API documentation. It removes cookie banners, newsletter popups and chat widgets before capture; bot checks, blank pages and failed loads are never billed. Its MCP server lets AI agents take screenshots, and 1,000 screenshots a month are free with no card; paid plans start at $5 for 3,000. Sign up for the free plan.
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.




