neuron_set_mock
Intercept matching network requests and return custom responses to test error states, slow APIs, or custom payloads without touching the real backend.
Instructions
Add a network mock rule — intercept requests matching a URL pattern and return a custom response. Use to test error states, slow APIs, or custom payloads without touching the real backend.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| delay | No | Response delay in ms (simulate slow API) | |
| label | No | Human label for this mock rule | |
| method | No | HTTP method filter (GET, POST, etc). Omit to match all. | |
| matchType | No | Pattern type (default: glob) | |
| urlPattern | Yes | URL pattern to match (glob or regex) | |
| responseBody | Yes | Response body to return (JSON string) | |
| responseStatus | No | HTTP status code to return (default: 200) | |
| responseHeaders | No | Custom response headers |