This can happen if you access a URL that is automatically redirected. In my case, I mistakenly accessed an HTTP endpoint that redirected to HTTPS.
The requests library drops some headers in that case, including the 'Content-Type' header.
See this issue: https://github.com/psf/requests/issues/3490