Intercept XHR Request
Inspect permitted network responses generated by authorized browser sessions by capturing specific fetch() or XHR requests during a page load.
Use
interceptFetchRequestto inspect permitted network responses generated by an authorized browser session by capturing specificfetch()or XHR requests during a page load.
Command
"interceptFetchRequest" β monitor network activity and return specific XHR/fetch responses. URL matching uses .includes(); if more than one request matches the string, all are returned as an array.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
interceptFetchRequest |
array | Yes | List of strings to match against outgoing request URLs |
url |
string | Yes | URL to be loaded and monitored |
browserActions |
array | No | Browser actions (e.g., verification flow handling) to perform during request |
Example
You will receive an array of JSON responses from all fetch/XHR requests that matched the string(s) provided.
Notes
Great for:
- Sites that dynamically load content via JavaScript
- Skipping complex DOM parsing by reading documented or permitted application endpoints
- Working with documented or permitted application endpoints
Use interceptFetchRequest to inspect permitted network responses generated by authorized browser sessions. Pair it with execute_js to post-process the captured data.