Please note that it might not work the same as the current version of httpx, which is mentioned in the original issue.
For example, this is what httpx does:
>>> httpx.Client(base_url="http://www.example.com/a/b").get("c").url # different
URL('http://www.example.com/a/b/c')
>>> httpx.Client(base_url="http://www.example.com/a/b/").get("c").url # same
URL('http://www.example.com/a/b/c')
I didn't follow httpx's style. In my point of view, following RFC 3986 as what urljoin of urllib.parse does make more sense to me, since it works exactly the same as how the browser treats relative paths.
Resolves #181
Here're some example usages of this new parameter:
Please note that it might not work the same as the current version of
httpx
, which is mentioned in the original issue. For example, this is whathttpx
does:I didn't follow
httpx
's style. In my point of view, following RFC 3986 as whaturljoin
ofurllib.parse
does make more sense to me, since it works exactly the same as how the browser treats relative paths.