docstring/util/url
This commit is contained in:
parent
42166a2c4e
commit
29c701b3d5
1 changed files with 1 additions and 0 deletions
|
@ -8,6 +8,7 @@ from rwx.log import stream as log
|
|||
|
||||
|
||||
def add_url_path(url: str, extra_path: str) -> str:
|
||||
"""Append an extra segment to an existing URL."""
|
||||
parts = urlparse(url)
|
||||
parts = parts._replace(path=str(Path(parts.path) / extra_path))
|
||||
return urlunparse(parts)
|
||||
|
|
Loading…
Reference in a new issue