Setting empty str as data does not set text/plain header #5392
Closed
Description
Setting empty str as data does not set text/plain header
await session.post(url, data='')
will set
'Content-Type': 'application/octet-stream'
in the header.
Expected would be
'Content-Type': 'text/plain'
This is also described in the docs.
It shows data as a shortcut for text/plain.
📋 Versions
Python/3.8
aiohttp/3.7.3