From 280e0aaee85413d208a57133562d372e592f9df8 Mon Sep 17 00:00:00 2001 From: G Date: Sat, 31 Jan 2026 17:34:18 +0530 Subject: [PATCH] Docs: clarify JSON request Content-Type requirement --- docs/quickstart.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/quickstart.rst b/docs/quickstart.rst index 6af09eb648..2747d0414a 100644 --- a/docs/quickstart.rst +++ b/docs/quickstart.rst @@ -709,6 +709,11 @@ This is a shortcut to passing the data to the :func:`~flask.json.jsonify` function, which will serialize any supported JSON data type. That means that all the data in the dict or list must be JSON serializable. +.. note:: + + When sending JSON requests, clients must include the + ``Content-Type: application/json`` header. + Otherwise, ``request.get_json()`` may return ``None``. For complex types such as database models, you'll want to use a serialization library to convert the data to valid JSON types first.