Create Request
invoker_create_requestCreate HTTP request files in .ivk format by specifying method, URL, headers, body, and scripts for API testing and automation.
Instructions
Create a new .ivk request file. Specify the HTTP method, URL, and optionally headers, body, auth, scripts. The file is written to disk in .ivk format.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_path | Yes | Path where the .ivk file should be created | |
| method | Yes | HTTP method | |
| url | Yes | Request URL (can contain {{variables}}) | |
| name | No | Request name (@name directive) | |
| description | No | Request description (@description directive) | |
| headers | No | HTTP headers as key-value pairs | |
| body | No | Request body (usually JSON) | |
| auth | No | Auth directive (e.g. 'bearer {{token}}', 'basic user pass', 'none') | |
| pre_script | No | JavaScript pre-request script | |
| post_script | No | JavaScript post-response script (can extract values with ivk.env.set) | |
| test_script | No | JavaScript test assertions |