From 983d271d8add4e047b8beaeda00c08fe7adf88c7 Mon Sep 17 00:00:00 2001 From: AnupojuRohit Date: Thu, 1 Jan 2026 15:47:52 +0530 Subject: [PATCH] docs: clarify 415 error when receiving JSON requests --- docs/quickstart.rst | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/docs/quickstart.rst b/docs/quickstart.rst index 6af09eb6..1c96ffc3 100644 --- a/docs/quickstart.rst +++ b/docs/quickstart.rst @@ -715,6 +715,18 @@ serialization library to convert the data to valid JSON types first. There are many serialization libraries and Flask API extensions maintained by the community that support more complex applications. +.. note:: + + When receiving JSON data in a request, Flask expects the + ``Content-Type`` header to be set to ``application/json``. + If the header is missing, incorrect, or the request body contains + invalid JSON, Flask may respond with a **415 Unsupported Media Type** + error. + + To avoid this, ensure that clients send valid JSON and include the + correct ``Content-Type`` header when making requests. + + .. _sessions: