browser_route
Intercept and mock network requests by setting up a route that matches a URL pattern. Define custom responses with status codes, headers, and body content to test behavior without real server data.
Instructions
Set up a route to mock network requests matching a URL pattern
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| body | No | Response body (text or JSON string) | |
| status | No | HTTP status code to return (default: 200) | |
| headers | No | Headers to add in "Name: Value" format | |
| pattern | Yes | URL pattern to match (e.g., "**/api/users", "**/*.{png,jpg}") | |
| contentType | No | Content-Type header (e.g., "application/json", "text/html") | |
| removeHeaders | No | Comma-separated list of header names to remove from request |