add_map_local
Create temporary request mocks that substitute custom bodies, headers, and status codes for matching URL patterns, with optional body-only mode and TTL expiry.
Instructions
Mock responses: matching requests get this content instead of (or, with mode=body_only, on top of) the server's answer. Expires after ttl (default 1h).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ttl | No | 1h | |
| url | Yes | URL pattern with * wildcards, e.g. https://api.example.com/v2/feed* | |
| body | No | Response body text (use this or file) | |
| file | No | Absolute path of a file to serve; read on every request | |
| mode | No | full | |
| name | No | ||
| status | No | ||
| headers | No | Extra response headers {name: value} | |
| methods | No | Only these methods (default any) | |
| content_type | No | Default: guessed from the body or file extension | |
| graphql_operation | No | Only this GraphQL operation (mock one query of a /graphql endpoint) |