Closed agners closed 2 years ago
Fixes: #7
Ok, now I think I've got it right :smile:
It seems that newer aiohttp refuse to parse JSON if the MIME type isn't JSON. From what I understand, the API always returns (and did already in the past) text/html
for weather forecasts, despite asking for application/json
. IMHO that's wrong/weired, but it is what it is. For other requests or error cases, the API seems to return application/json
. Make sure to check Content-Type
depending on API used.
It seems that newer aiohttp refuse to parse JSON if the MIME type isn't JSON.
I'm pretty sure this has been aiohttp's default behavior for quite some time. At least I remember struggling with this in the past :)
Awesome, thanks a lot!
Computers are hard... :man_shrugging: