Automate browser based workflows with AI
Python aiapiautomationbrowserbrowser-automationcomputergptllmplaywrightpowerautomatepuppeteerpythonrpaseleniumvisionworkflow
honor x-www-form-urlencoded in http block (#4232)
Marc Kelechava5e3211afacfb
diff --git a/skyvern/config.py b/skyvern/config.pyindex 57cbf0709..341c76c33 100644--- a/skyvern/config.py+++ b/skyvern/config.py@@ -291,7 +291,7 @@ class Settings(BaseSettings):# GEMINIGEMINI_API_KEY: str | None = NoneGEMINI_INCLUDE_THOUGHT: bool = False- GEMINI_THINKING_BUDGET: int | None = 500+ GEMINI_THINKING_BUDGET: int | None = None# VERTEX_AIVERTEX_CREDENTIALS: str | None = Nonediff --git a/skyvern/forge/sdk/core/aiohttp_helper.py b/skyvern/forge/sdk/core/aiohttp_helper.pyindex 1ce597e69..cd9ef914c 100644--- a/skyvern/forge/sdk/core/aiohttp_helper.py+++ b/skyvern/forge/sdk/core/aiohttp_helper.py@@ -14,6 +14,8 @@ async def aiohttp_request(method: str,url: str,headers: dict[str, str] | None = None,+ *,+ body: dict[str, Any] | str | None = None,data: dict[str, Any] | None = None,json_data: dict[str, Any] | None = None,cookies: dict[str, str] | None = None,@@ -39,10 +41,17 @@ async def aiohttp_request(# Handle body based on content type and methodif method.upper() != "GET":+ # Explicit overrides firstif json_data is not None:request_kwargs["json"] = json_dataelif data is not None:request_kwargs["data"] = data+ elif body is not None:+ content_type = (headers or {}).get("Content-Type") or (headers or {}).get("content-type") or ""+ if "application/x-www-form-urlencoded" in content_type.lower():+ request_kwargs["data"] = body+ else:+ request_kwargs["json"] = bodyasync with session.request(method.upper(), **request_kwargs) as response:response_headers = dict(response.headers)diff --git a/skyvern/forge/sdk/workflow/models/block.py b/skyvern/forge/sdk/workflow/models/block.pyindex 80aaf9467..9322d6c01 100644--- a/skyvern/forge/sdk/workflow/models/block.py+++ b/skyvern/forge/sdk/workflow/models/block.py@@ -3891,7 +3891,7 @@ class HttpRequestBlock(Block):method=self.method,url=self.url,headers=self.headers,- json_data=self.body,+ body=self.body,timeout=self.timeout,follow_redirects=self.follow_redirects,)