Mock response
add_mock_ruleDefine a rule to reply to matching HTTP requests with a fixed status, body, or headers, while allowing other traffic to pass through.
Instructions
Reply to matching requests with a fixed response (passes through everything else).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| body | No | Raw response body. | |
| json | No | JSON body (sets Content-Type: application/json). | |
| method | No | HTTP method to match (GET, POST, ...). Omit = all methods. | |
| status | Yes | HTTP status to return. | |
| headers | No | ||
| urlPattern | No | RegExp source matched case-insensitively against the full request URL. |