About use http2 to request League of Legends Client Api get some question. #2098
-
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. |
Beta Was this translation helpful? Give feedback.
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. |
Beta Was this translation helpful? Give feedback.
-
I use got in node too, and i cant access the same endpoint |
Beta Was this translation helpful? Give feedback.
(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.