You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, thanks very much for the quite useful package ! I am quite new to API clients, and I am facing an issue I am not sure to understand.
I am trying to communicate with a simple api on a local server, which provides a /login endpoint with simple login and password form, and a /values endpoint, which allows to get relevant values. Using the requests module, I can post to the /login endpoint and then use the session to get the values from the /values endpoint without problems. However, when doing the same with the generated client, the login happens correctly however when running the next GET method, I get the following error:
httpx.RemoteProtocolError: can't handle event type ConnectionClosed when role=SERVER and state=SEND_RESPONSE
coming from h11._util.RemoteProtocolError: can't handle event type ConnectionClosed when role=SERVER and state=SEND_RESPONSE
I tried what I could think of, but could not figure out how to fix it. Any clues on how to make this work ? Apologies if I am missing something simple or if the answer is already here somewhere, any help would be very much appreciated !
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi, thanks very much for the quite useful package ! I am quite new to API clients, and I am facing an issue I am not sure to understand.
I am trying to communicate with a simple api on a local server, which provides a
/login
endpoint with simple login and password form, and a/values
endpoint, which allows to get relevant values. Using therequests
module, I can post to the/login
endpoint and then use the session to get the values from the/values
endpoint without problems. However, when doing the same with the generated client, the login happens correctly however when running the nextGET
method, I get the following error:httpx.RemoteProtocolError: can't handle event type ConnectionClosed when role=SERVER and state=SEND_RESPONSE
coming from
h11._util.RemoteProtocolError: can't handle event type ConnectionClosed when role=SERVER and state=SEND_RESPONSE
Here is the sample code of what I did.
I tried what I could think of, but could not figure out how to fix it. Any clues on how to make this work ? Apologies if I am missing something simple or if the answer is already here somewhere, any help would be very much appreciated !
Thanks again
Beta Was this translation helpful? Give feedback.
All reactions