req.json() is a weak point
yegorov-p opened this issue · comments
Pavel Yegorov commented
I really don't like the part with
req = requests.post(smth)
return req.json()
It can cause so many problems, server can return 50* and it will break .json() method, server can theoretically return "bad" json and so on.
What do you think about idea to at least start validating response headers, or (better!) check if server response is a correct JSON. I can make a PR if you approve the idea.
Harold Kim commented
I will change it at some point. I think there are more serious things than this though.
avg22980 commented
I didnt know what the hell i was doing. Go for it.
…On Sun, Feb 21, 2021, 5:02 PM stypr ***@***.***> wrote:
Closed #16 <#16>.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#16 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AS5OMNTDA4FN5NH72XHWJNTTAGUJJANCNFSM4X7NEHQQ>
.