You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Request.get_json() will raise a 400 BadRequest error if the Content-Type header is not application/json. This makes a very common source of confusion more visible. #2339
Expected behaviour
HTTP status code 200 and 'application/json' response
Actual behaviour
HTTP status code 400 with error message...
Did not attempt to load JSON data because the request Content-Type was not 'application/json'
Steps to reproduce
pip install --upgrade Werkzeug==2.1.*
Additional info:
Output of the commands:
Python 3.9.5
Version: 2.13.0"
The text was updated successfully, but these errors were encountered:
Description
Changes in Werkzeug release 2.1 https://werkzeug.palletsprojects.com/en/2.1.x/changes/#version-2-1-0 include...
Expected behaviour
HTTP status code 200 and 'application/json' response
Actual behaviour
HTTP status code 400 with error message...
Did not attempt to load JSON data because the request Content-Type was not 'application/json'
Steps to reproduce
pip install --upgrade Werkzeug==2.1.*
Additional info:
Output of the commands:
Python 3.9.5
Version: 2.13.0"
The text was updated successfully, but these errors were encountered: