Add API that will allow/deny/warn automatic decoding of json based on content-type. #1723
Closed
Description
Now, aiohttp issue warning if await response.json() called and response does not contain correct content-type.
This should be configurable. I suggest to to require content_type.startswith('application/json'). Aiohttp's users must be able to turn this check off and also specify his own MIME-type that should pass this check. I understand, that many broken HTTP-servers give JSON-response without setting correct content-type. I think, we should fight against these servers.