mock_response
Return a mocked response for every request matching a Unix glob URL pattern, with custom status, headers, and body.
Instructions
Return a mocked response for every request matching url_pattern.
``url_pattern`` uses Unix glob syntax (``*``, ``?``), matched against
the full request URL. ``body`` is UTF-8 text (cap: 10 MiB to prevent
RAM exhaustion). Returns a rule id; pass it to
``stop_interception(rule_id)`` or call with no args to clear all.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| body | No | ||
| status | No | ||
| headers | No | ||
| url_pattern | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |