intercept_request
Intercept network requests matching a URL pattern to log, block, modify, mock, or stop them.
Instructions
Intercept network requests matching a pattern.
Args: url_pattern: URL glob pattern (e.g. "**/api/login*"). action: "log", "block", "modify", "mock", or "stop" (unroute). modify_headers: Headers to add/override (action="modify"). modify_body: Request body replacement (action="modify"). mock_response: Dict with "status", "headers", "body" (action="mock").
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url_pattern | Yes | ||
| action | No | log | |
| modify_headers | No | ||
| modify_body | No | ||
| mock_response | No |