mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-23 05:12:39 +00:00
feat: http body type & http input support editor variable (#2603)
* feat: http body type & http input support editor variable * fix type * chore: code * code
This commit is contained in:
@@ -108,6 +108,8 @@ export enum NodeInputKeyEnum {
|
||||
httpMethod = 'system_httpMethod',
|
||||
httpParams = 'system_httpParams',
|
||||
httpJsonBody = 'system_httpJsonBody',
|
||||
httpFormBody = 'system_httpFormBody',
|
||||
httpContentType = 'system_httpContentType',
|
||||
httpTimeout = 'system_httpTimeout',
|
||||
abandon_httpUrl = 'url',
|
||||
|
||||
@@ -217,3 +219,13 @@ export enum RuntimeEdgeStatusEnum {
|
||||
|
||||
export const VARIABLE_NODE_ID = 'VARIABLE_NODE_ID';
|
||||
export const DYNAMIC_INPUT_REFERENCE_KEY = 'DYNAMIC_INPUT_REFERENCE_KEY';
|
||||
|
||||
// http node body content type
|
||||
export enum ContentTypes {
|
||||
none = 'none',
|
||||
formData = 'form-data',
|
||||
xWwwFormUrlencoded = 'x-www-form-urlencoded',
|
||||
json = 'json',
|
||||
xml = 'xml',
|
||||
raw = 'raw-text'
|
||||
}
|
||||
|
@@ -8,7 +8,8 @@ import {
|
||||
WorkflowIOValueTypeEnum,
|
||||
NodeInputKeyEnum,
|
||||
NodeOutputKeyEnum,
|
||||
FlowNodeTemplateTypeEnum
|
||||
FlowNodeTemplateTypeEnum,
|
||||
ContentTypes
|
||||
} from '../../constants';
|
||||
import { Input_Template_DynamicInput } from '../input';
|
||||
import { Output_Template_AddOutput } from '../output';
|
||||
@@ -82,6 +83,7 @@ export const HttpNode468: FlowNodeTemplateType = {
|
||||
label: '',
|
||||
required: false
|
||||
},
|
||||
// json body data
|
||||
{
|
||||
key: NodeInputKeyEnum.httpJsonBody,
|
||||
renderTypeList: [FlowNodeInputTypeEnum.hidden],
|
||||
@@ -89,6 +91,24 @@ export const HttpNode468: FlowNodeTemplateType = {
|
||||
value: '',
|
||||
label: '',
|
||||
required: false
|
||||
},
|
||||
// form body data
|
||||
{
|
||||
key: NodeInputKeyEnum.httpFormBody,
|
||||
renderTypeList: [FlowNodeInputTypeEnum.hidden],
|
||||
valueType: WorkflowIOValueTypeEnum.any,
|
||||
value: [],
|
||||
label: '',
|
||||
required: false
|
||||
},
|
||||
// body data type
|
||||
{
|
||||
key: NodeInputKeyEnum.httpContentType,
|
||||
renderTypeList: [FlowNodeInputTypeEnum.hidden],
|
||||
valueType: WorkflowIOValueTypeEnum.string,
|
||||
value: ContentTypes.json,
|
||||
label: '',
|
||||
required: false
|
||||
}
|
||||
],
|
||||
outputs: [
|
||||
|
Reference in New Issue
Block a user