From fa673f9b4c7838bc2efc2a990ce38923689e0a16 Mon Sep 17 00:00:00 2001 From: Yeuoly Date: Thu, 21 Mar 2024 16:21:59 +0800 Subject: [PATCH] fix: raw text --- api/core/workflow/nodes/http_request/entities.py | 2 +- api/core/workflow/nodes/http_request/http_executor.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/api/core/workflow/nodes/http_request/entities.py b/api/core/workflow/nodes/http_request/entities.py index 87529d8f58..4ab5538cf5 100644 --- a/api/core/workflow/nodes/http_request/entities.py +++ b/api/core/workflow/nodes/http_request/entities.py @@ -33,7 +33,7 @@ class HttpRequestNodeData(BaseNodeData): return v class Body(BaseModel): - type: Literal['none', 'form-data', 'x-www-form-urlencoded', 'raw', 'json'] + type: Literal['none', 'form-data', 'x-www-form-urlencoded', 'raw-text', 'json'] data: Union[None, str] variables: list[VariableSelector] diff --git a/api/core/workflow/nodes/http_request/http_executor.py b/api/core/workflow/nodes/http_request/http_executor.py index 673c199196..67aa53a07b 100644 --- a/api/core/workflow/nodes/http_request/http_executor.py +++ b/api/core/workflow/nodes/http_request/http_executor.py @@ -275,7 +275,7 @@ class HttpExecutor: self.headers['Content-Type'] = f'multipart/form-data; boundary={self.boundary}' else: self.body = urlencode(body) - elif node_data.body.type in ['json', 'raw']: + elif node_data.body.type in ['json', 'raw-text']: self.body = original_body elif node_data.body.type == 'none': self.body = ''