# HTTP 节点
调用 HTTP API
# 数据结构定义
# 范例
{
id: {random(6)},
type: 'http',
data: {
title: `HTTP`,
inputsValues: {
api_url: { // 请求 URL
type: 'constant',
content: '',
},
api_method: { // 请求方法boundaryboundary
type: 'constant',
content: 'GET',
},
headers: {}, // 请求头
params: {}, // URL 参数
body_type: { // 请求体类型 none 无请求体,json 格式的模版字符串,raw-text 原始文本
type: 'constant',
content: 'json',
},
body_json: { // JSON 类型内容
type: 'template',
content: '',
},
body_raw_text: { // 原始文本内容
type: 'template',
content: '',
},
max_retries: { // 最大重试次数
type: 'constant',
content: 3,
},
retry_interval: { // 重试间隔
type: 'constant',
content: 1000,
},
},
inputs: {
type: 'object',
required: [],
properties: {
api_url: { type: 'string' },
api_method: { type: 'string' },
headers: {
type: 'object',
properties: {},
},
params: {
type: 'object',
properties: {},
},
body_type: { type: 'string' },
body_json: { type: 'string' },
body_raw_text: { type: 'string' },
max_retries: { type: 'number' },
retry_interval: { type: 'number' },
},
},
outputs: {
type: 'object',
properties: {
status_code: { type: 'number' },
body: { type: 'string' },
},
},
},
}
← 循环/批处理结束节点 图片生成节点 →