net_intercept_add
Add a network intercept rule to block a request, mock a response, or modify request headers. Matches by URL substring; first match wins.
Instructions
Add a network intercept rule via CDP Fetch: block a request, mock its response, or modify its headers. Matches when urlPattern is a substring of the request url; the first matching rule wins. Enables interception lazily on first use.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| body | No | mock: response body | |
| action | Yes | ||
| status | No | mock: response status code (default 200) | |
| sessionId | No | ||
| setHeaders | No | modify: headers to set/override on the outgoing request | |
| urlPattern | Yes | substring match against the request url | |
| contentType | No | mock: response content-type (default application/json) |