Weird behaviour with AsyncClient #2263
Replies: 1 comment 3 replies
-
|
So I took a look at your description of this on Gitter too.
So I don't think this description quite matches what's actually happening. I double checked and the URL redirection is correctly formed, and isn't to the composite URL. But I'll describe this more carefully just in case there's still any confusion. You've got a test client, which is making requests directly to a web app rather than actual network requests. The initial request is "to" The redirected request is "to" |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Dear all, I hope I find you good.
I'm facing a weird behaviour with the
AsyncClient. My scenario is the followingPOSTing to some backend API.Locationvalue set to a remote website:https://....AsyncClientsends aGETto a local resource, which clearly does not exist: the request becomeshttp://localhost:8000/https://...and the response code is 404 from my local backend.It seems the client cannot recognise whether the
Locationvalue refers to a local or a remote path, therefore a local one is always applied.The desired outcome would be to actually redirect the client to the remote website
https://..., with a response status code 200.I hope i made myself explained.
Let me know what you think.
Regards.
Beta Was this translation helpful? Give feedback.
All reactions