Skip to content

Commit

Permalink
fix(fal_client): don't forget to urlencode webhook_url (#347)
Browse files Browse the repository at this point in the history
  • Loading branch information
efiop authored Oct 25, 2024
1 parent 0a228d8 commit 38b367e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions projects/fal_client/src/fal_client/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
from dataclasses import dataclass, field
from functools import cached_property
from typing import Any, AsyncIterator, Iterator, TYPE_CHECKING, Optional, Literal
from urllib.parse import urlencode

import httpx
from httpx_sse import aconnect_sse, connect_sse
Expand Down Expand Up @@ -442,7 +443,7 @@ async def submit(
url += "/" + path.lstrip("/")

if webhook_url is not None:
url += f"?fal_webhook={webhook_url}"
url += "?" + urlencode({"fal_webhook": webhook_url})

headers = {}
if hint is not None:
Expand Down Expand Up @@ -667,7 +668,7 @@ def submit(
url += "/" + path.lstrip("/")

if webhook_url is not None:
url += f"?fal_webhook={webhook_url}"
url += "?" + urlencode({"fal_webhook": webhook_url})

headers = {}
if hint is not None:
Expand Down

0 comments on commit 38b367e

Please sign in to comment.