fix: raw text

This commit is contained in:
Yeuoly 2024-03-21 16:21:59 +08:00
parent 0c409e2b9e
commit fa673f9b4c
No known key found for this signature in database
GPG Key ID: A66E7E320FB19F61
2 changed files with 2 additions and 2 deletions

View File

@ -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]

View File

@ -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 = ''