Skip to content

Commit

Permalink
api-v0.1.3 & correctly translate scheme inside the TwirpClient
Browse files Browse the repository at this point in the history
  • Loading branch information
theomonnom committed Oct 31, 2023
1 parent fbf1020 commit 62379f7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion livekit-api/livekit/api/_twirp_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,11 @@ class TwirpErrorCode:
class TwirpClient:
def __init__(self, host: str, pkg: str, prefix: str = DEFAULT_PREFIX) -> None:
parse_res = urlparse(host)
host = f"http://{parse_res.netloc}/{parse_res.path}"
scheme = parse_res.scheme
if scheme.startswith("ws"):
scheme = scheme.replace("ws", "http")

host = f"{scheme}://{parse_res.netloc}/{parse_res.path}"
self.host = host.rstrip("/")
self.pkg = pkg
self.prefix = prefix
Expand Down
2 changes: 1 addition & 1 deletion livekit-api/livekit/api/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.1.2"
__version__ = "0.1.3"

0 comments on commit 62379f7

Please sign in to comment.