Skip to content

Commit ef98862

Browse files
schloerketdstein
andauthored
Use posixpath.join to merge url components
Co-authored-by: Taylor Steinberg <[email protected]>
1 parent e7d509b commit ef98862

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/posit/connect/_api_call.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ def _patch_api(self, json: Jsonifiable | None, *, extra_endpoint: str = "") -> J
1818
def _put_api(self, json: Jsonifiable | None, *, extra_endpoint: str = "") -> Jsonifiable: ...
1919

2020

21-
def endpoint(ctx: Context, path: str, *, extra_endpoint: str = "") -> str:
22-
return ctx.url + path + extra_endpoint
21+
def endpoint(ctx: Context, *path) -> str:
22+
return ctx.url + posixpath.join(*path)
2323

2424

2525
# Helper methods for API interactions

0 commit comments

Comments
 (0)