HTTP request (detailed)
Referenced In
Fields
Validation applies the defaults shown here.
| Field | Type | Description | Default |
|---|---|---|---|
| url | string | Optional. An absolute http:// or https:// URL, a path that starts with one /, or a value that starts with an environment variable, such as $BASE_URL/docs. A path is joined to origin.Pattern: `^(https?:// | /(?!/) |
| openApi | one of: - string - object(openApi) | Optional. No description provided. | — |
| statusCodes | one of: - integer - array of integer | Optional. Accepted status codes. If the specified URL returns a code other than what is specified here, the action fails. A single integer is treated as a one-item list. | [200,201] |
| method | string | Optional. Method of the HTTP request Accepted values: get, put, post, patch, delete | get |
| timeout | integer | Optional. Maximum time in milliseconds to wait for the response. If exceeded, the step fails. At least 1. Minimum: 1 | 60000 |
| request | object(Request) | Optional. No description provided. | — |
| response | object(Response) | Optional. No description provided. | — |
| allowAdditionalFields | boolean | Optional. If false, the step fails when the response data contains fields not specified in the response body. | true |
| path | string | Optional. File path to save the response body, relative to directory. Specify a file extension that matches the expected response type, such as .json for JSON content or .txt for strings. | — |
| directory | string | Optional. Directory to save the response in. If the directory doesn’t exist, creates the directory. A relative directory, or a relative path without one, resolves against the spec file’s folder. | — |
| maxVariation | number | Optional. Allowed variation as a fraction (0 to 1) of text different between the current output and previously saved output. For example, 0.1 means 10%. If the difference between the current output and the previous output is greater than maxVariation, the step returns a warning. If output doesn’t exist at path, this value is ignored.Minimum: 0. Maximum: 1 | 0 |
| overwrite | string | Optional. If true, overwrites the existing output at path if it exists.If aboveVariation, overwrites the existing output at path if the difference between the new output and the existing output is greater than maxVariation.Accepted values: true, false, aboveVariation | aboveVariation |
Examples
{"url": "example","statusCodes": [200,201],"method": "get","timeout": 60000,"allowAdditionalFields": true,"path": "example","directory": "example","maxVariation": 0,"overwrite": "aboveVariation"}