flask.request.form is filled with data only if Content-Type header is set to application/x-www-form-urlencoded (or a similar value indicating a form). However, if a client sends Content-Type: application/json, flask.request.form is empty and we need to access flask.request.get_json() to obtain the data.
flask.request.formis filled with data only ifContent-Typeheader is set toapplication/x-www-form-urlencoded(or a similar value indicating a form). However, if a client sendsContent-Type: application/json,flask.request.formis empty and we need to accessflask.request.get_json()to obtain the data.