About use http2 to request League of Legends Client Api get some question. #2098
Answered
by
lovelydinosaur
xiaowuyaya
asked this question in
Q&A
|
the code like this: import httpx
client = httpx.Client(http2=True, verify=False)
response = client.get('https://riot:ITdf5fK6X4aiMoXO2iXHCA@127.0.0.1:9558/lol-match-history/v3/matchlist/account/4124190404?begIndex=0&endIndex=20')
print(response.http_version)
print(response.json())and i get error h2.exceptions.ProtocolError: cannot receive data before headers. |
Answered by
lovelydinosaur
Feb 28, 2022
Replies: 2 comments 1 reply
|
(What does any of it mean really??) You'd see that exception if the server had a broken HTTP/2 implementation, and sent the response body without first sending the response status code and headers. I'd suggest switching to plain ol' HTTP/1.1. Our reliable and trusty friend. |
1 reply
Answer selected by
lovelydinosaur
|
I use got in node too, and i cant access the same endpoint |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
(What does any of it mean really??)
You'd see that exception if the server had a broken HTTP/2 implementation, and sent the response body without first sending the response status code and headers.
I'd suggest switching to plain ol' HTTP/1.1. Our reliable and trusty friend.