HTTP Request
Send a fully-configurable HTTP request: query, headers, auth, typed body, retries, typed response or download to file.
API & HTTPHTTPRequest
概述
HTTP Request 是 AutoFlowRPA 中 API & HTTP 类别下的无代码自动化步骤。 当工作流执行到此处时,它会在单个步骤中完成其操作。 您可以配置 20 个参数,精确控制其行为方式。 它是可在可视化编辑器中拖入工作流的 340 个命令之一,无需编写脚本。
功能说明
Send a fully-configurable HTTP request: query, headers, auth, typed body, retries, typed response or download to file.
参数
| 参数 | 类型 | 是否必填 | 默认值 | 说明 |
|---|---|---|---|---|
| URL | string | 必填 | 示例: https://api.example.com/items 支持变量 | |
| Method | dropdownGET · POST · PUT · PATCH · DELETE · HEAD · OPTIONS | 必填 | GET | |
| Query params (optional) | multiline | 可选 | JSON object or 'key=value' / 'key: value' lines. 支持变量 | |
| Headers (optional) | multiline | 可选 | JSON object or 'Key: Value' lines. 支持变量 | |
| Authentication | dropdownNone · Bearer · Basic · API Key (header) | 可选 | None | |
| Auth value (optional) | string | 可选 | Bearer token, 'user:password' for Basic, or the API key. 支持变量 | |
| API key header name | string | 可选 | X-API-Key | Header name when Authentication = API Key. 支持变量 |
| Body type | dropdownNone · JSON · Form (urlencoded) · Raw · File | 可选 | None | |
| Body (optional) | multiline | 可选 | JSON / raw text, or 'key=value' lines for a form body. 示例: {"name": "Bob"} 支持变量 | |
| Body from file (optional) | file | 可选 | When Body type = File, send this file's bytes. 支持变量 | |
| Timeout (seconds) | number | 可选 | 60 | |
| Follow redirects | dropdownYes · No | 可选 | Yes | |
| Ignore TLS cert errors | dropdownNo · Yes | 可选 | No | |
| Retries on failure | number | 可选 | 0 | Retry network errors / 5xx this many times. |
| Response type | dropdownAuto · JSON · Text · Save to file | 可选 | Auto | Auto parses JSON when the server says so, else text. |
| Download to file (optional) | file | 可选 | Used when Response type = Save to file. 支持变量 | |
| Fail on HTTP error (4xx/5xx) | dropdownNo · Yes | 可选 | No | |
| Store response in | variable | 必填 | 示例: response | |
| Store status code in | variable | 可选 | 示例: status | |
| Store response headers in | variable | 可选 | 示例: respHeaders |
如何使用 HTTP Request
- 1
打开 AutoFlowRPA,将 HTTP Request 命令从 API & HTTP 分组拖放到画布上。
- 2
在侧边面板中设置其参数——HTTP Request 有 20 个可配置字段。
- 3
将它连入你的工作流并点击运行。一切都在你的本机上本地执行。
常见问题
HTTP Request 命令有什么作用?
Send a fully-configurable HTTP request: query, headers, auth, typed body, retries, typed response or download to file.
HTTP Request 命令属于哪个分组?
HTTP Request 属于 API & HTTP 分组。AutoFlowRPA 附带 340+ 个现成命令,无需代码即可组合使用。
HTTP Request 命令需要任何参数吗?
需要——HTTP Request 有 20 个可配置字段,均可在可视化节点编辑器中编辑。