ACTION_HTTP_REQUEST
Send HTTP requests from automation workflows to call APIs and store response, status, and success in variables for conditional logic or error handling.
Instructions
发送 HTTP 请求,响应体存入变量(需网络)。输出:http_success, http_error, http_status_code, http_response, http_truncated。headers / body 要写成字符串(JSON 转义成字符串);写成嵌套 JSON 对象会被转成 {k=v} 文本而失效。请求失败不抛错:看 http_success(状态码 200–399 为 true),要按节点出错处理可加 require=http_success。对不稳定的第三方服务设合理 timeout(失败默认跳过继续)。。字符串参数支持 ${var} 插值;结果以变量快照 JSON 返回。
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | 请求 URL,支持 ${var} | |
| body | No | 请求体字符串,支持 ${var};只在 POST/PUT/PATCH 发送,未设 Content-Type 时按 application/json | |
| method | No | GET / POST / PUT / DELETE / PATCH 等(PATCH 以 POST + X-HTTP-Method-Override 发送)(默认 GET) | |
| headers | No | 请求头字符串:JSON 对象字符串(如 {"Authorization":"Bearer x"})或 Key:Value;Key2:Value2,支持 ${var} | |
| require | No | 执行后要求为 true 的变量名(如 click_success),不满足按出错处理 | |
| timeout | No | 连接/读取超时毫秒(最小 1000)(默认 30000) | |
| on_error | No | 节点出错时:skip=跳过继续(默认),stop=停止整个工作流 | |
| output_var | No | 响应体另存到的变量名(http_response 总会写) | |
| node_timeout_ms | No | 单节点超时毫秒,0=不限;默认 30 分钟 | |
| max_response_bytes | No | 响应体上限字节,超出截断并置 http_truncated=true(默认 5242880) |