mirror of
https://github.com/langgenius/dify.git
synced 2026-04-29 04:26:30 +08:00
fix: raw text
This commit is contained in:
parent
0c409e2b9e
commit
fa673f9b4c
@ -33,7 +33,7 @@ class HttpRequestNodeData(BaseNodeData):
|
|||||||
return v
|
return v
|
||||||
|
|
||||||
class Body(BaseModel):
|
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]
|
data: Union[None, str]
|
||||||
|
|
||||||
variables: list[VariableSelector]
|
variables: list[VariableSelector]
|
||||||
|
|||||||
@ -275,7 +275,7 @@ class HttpExecutor:
|
|||||||
self.headers['Content-Type'] = f'multipart/form-data; boundary={self.boundary}'
|
self.headers['Content-Type'] = f'multipart/form-data; boundary={self.boundary}'
|
||||||
else:
|
else:
|
||||||
self.body = urlencode(body)
|
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
|
self.body = original_body
|
||||||
elif node_data.body.type == 'none':
|
elif node_data.body.type == 'none':
|
||||||
self.body = ''
|
self.body = ''
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user