mock_response
Intercept network requests matching a URL pattern and respond with predefined data for testing without a backend.
Instructions
Intercept fetch/XHR requests matching a URL pattern and return a canned response. Useful for testing without a real backend. Injection survives until the page is reloaded.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url_pattern | Yes | Substring or regex pattern to match the request URL | |
| status | No | ||
| body | No | Response body string | {} |
| content_type | No | application/json |