Closed TheoBabilon closed 5 months ago
It's relevant, and the example needs to be updated to use the ASGITransport
. But... If you add a slash at the end of the /user/me/
, does still redirects?
In any case, PR welcome to add the ASGITransport
. :)
Can confirm that status_code is still 302
when targeting /user/me/
, so the trailing slash makes no difference here
Hi @Kludex ,
Not sure if relevant, but whilst following tip 5 Use HTTPX's AsyncClient instead of TestClient in one of my current FastAPIs, I was only receiving 302s status codes:
getting
I can reproduce from current README's MCVE. Steps to reproduce:
Then running
mcve.py
:gives
status_code
is indeed302
.I believe it comes from httpx's AsyncClient
app
parameter deprecation in 0.27.0.Changing to
fixes the issue, making the above MCVE pass.
FWIW,
uv pip list
gives