Configuration
Configuration
Section titled “Configuration”The @config directive lets you define shared settings that apply to multiple requests, reducing repetition.
File-Level Config
Section titled “File-Level Config”A config block at the top of the file applies to all requests in that file:
@configbaseUrl: https://api.example.comtimeout: 5000retries: 2headers: Content-Type: application/json Accept: application/jsonassert: status == 200Collection-Level Config
Section titled “Collection-Level Config”Scope configuration to a specific collection:
@configcollection: Auth APIbaseUrl: https://auth.example.comheaders: X-API-Key: {{apiKey}}Config Properties
Section titled “Config Properties”| Property | Description | Example |
|---|---|---|
baseUrl | Prepended to relative URLs (starting with /) | https://api.example.com |
timeout | Default timeout in milliseconds | 5000 |
retries | Default retry count for 5xx errors | 3 |
headers | Default headers (YAML-style, key: value) | Content-Type: application/json |
assert | Default assertions applied to every request | status == 200 |
collection | Scope this config to a named collection | Auth API |
Inheritance & Override Rules
Section titled “Inheritance & Override Rules”| Property | Behavior |
|---|---|
| baseUrl | Prepended to URLs that start with /. Full URLs are not affected. |
| headers | Merged — request-level headers override config headers with the same key. |
| timeout | Applied only if the request doesn’t define its own @timeout. |
| retries | Applied only if the request doesn’t define its own @retry. |
| assertions | Accumulated — both config and request assertions run. |
Example
Section titled “Example”@configbaseUrl: https://api.example.comheaders: Content-Type: application/json Authorization: Bearer {{token}}assert: status >= 200
###@name Get UsersGET /users
### This request overrides the Content-Type header@name Create UserPOST /usersContent-Type: application/xml
<user><name>John</name></user>In the Get Users request:
- URL resolves to
https://api.example.com/users Content-Type: application/jsonandAuthorization: Bearer {{token}}are applied@assert status >= 200is applied automatically
In the Create User request:
Content-Typeis overridden toapplication/xmlAuthorizationis still applied from config- The assertion is still applied
Next Steps
Section titled “Next Steps”- Learn about variable capture
- Explore pre-request chains