Httpx: More explicit documentation that `httpx.Client` is equivelent to `requests.Session`.

Created on 27 Sep 2019  路  3Comments  路  Source: encode/httpx

This isn't an issue (sorry if i posted in a wrong place), but i read the httpx doc and didn't find yet a solution.
In requests i use s = requests.session(), how can i do the same thing with httpx?
it will be possible to do something like s = httpx.session()?
Thanks and sorry again.

good first issue question requests-compat

All 3 comments

Hi @innawe, the equivalent of Requests' Session in HTTPX is the Client (or AsyncClient for async usage).

You can learn more here: Client instances. Let us know if the docs aren't giving enough details!

Edit: I reworded the title to be more easy to find if others are wondering the same thing. :)

I think the core issue here is that our "Requests Compat Guide" doesn't yet make that explicit.

We could also have an explicit callout in the advanced usage, that Client is an equivelent to requests's Session.

Hi, I am interested in tackling this!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

florimondmanca picture florimondmanca  路  5Comments

FlorianREGAZ picture FlorianREGAZ  路  4Comments

kde713 picture kde713  路  3Comments

florimondmanca picture florimondmanca  路  4Comments

StevenBorg picture StevenBorg  路  3Comments