Replies: 1 comment 2 replies
-
|
I've been using HTTPX a lot and I'd still be very interested in helping contribute here. |
Beta Was this translation helpful? Give feedback.
2 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.
Uh oh!
There was an error while loading. Please reload this page.
-
It'd be really nice if HTTPX suported
yarl.URLandhyperlink.EncodedURL/hyperlink.DecodedURLin addition tohttpx.URL. The data models are pretty similar, and I think it should be possible to convert directly from any of these types tohttpx.URLwithout round-tripping throughstrfirst.Would the maintainers be open to a PR for this?
If so, would
httpx.Request.__init__be the right place to do this conversion? That seems to be the "entry point" where all non-URLobjects are converted toURL: https://github.com/encode/httpx/blob/1.0.0.beta0/httpx/_models.py#L1092. For example, we could have a_convert_urlhelper function instead of callingURLdirectly.Naturally, it would need to gracefully handle the case when either package is not available, and the type annotations would have to be updated.
Beta Was this translation helpful? Give feedback.
All reactions