mirror of
https://github.com/Skyvern-AI/skyvern.git
synced 2026-04-28 03:30:10 +00:00
fix http block bug (#4261)
This commit is contained in:
parent
2be36c7738
commit
0b617f6635
2 changed files with 2 additions and 2 deletions
|
|
@ -58,7 +58,7 @@ async def aiohttp_request(
|
|||
# Handle body based on content type and method
|
||||
if method.upper() != "GET":
|
||||
# If files are provided, use multipart/form-data
|
||||
if files is not None:
|
||||
if files:
|
||||
form = aiohttp.FormData()
|
||||
|
||||
# Add files to form
|
||||
|
|
|
|||
|
|
@ -3916,7 +3916,7 @@ class HttpRequestBlock(Block):
|
|||
|
||||
# If files are provided, don't set default Content-Type (aiohttp will set multipart/form-data)
|
||||
if not self.files:
|
||||
if not self.headers.get("Content-Type") or not self.headers.get("content-type"):
|
||||
if not self.headers.get("Content-Type") and not self.headers.get("content-type"):
|
||||
LOG.info("Adding default content-type as application/json", headers=self.headers)
|
||||
self.headers["Content-Type"] = "application/json"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue