Replies: 1 comment
-
Personally I think it's a misdesign, and that Including a path prefix is always confusing because it's non-obvious if the behaviour will be a strict URL join or some form of URL append. Eg. what behavior is expected for... client = Client(base_url="https://www.example.com/that")
response = client.get("/this")
Yeah it's a confusing part of the API, and yes it does look like you've found yourself a corner-case bit of particularly broken behavior. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I was soo perplexed by this until I realized that httpx was ignoring part of the path that was used to build the request.
The client was built with the following:
Then I built a request using the following:
This was indeed a typo, which I didn't see at the time. However, it turns out that when this request is built, the url turns out to be:
It has essentially stripped off the
//foobar
part. I was quite confused for some time why it does that, until I started debugging.Is this a bug, or expected behavior? I certainly didn't expect it.
Beta Was this translation helpful? Give feedback.
All reactions