Read POST Data from the Body
Access form and JSON payloads in a view.
POST Carries a Body
Unlike a plain GET, a POST request ships data in its body. Your view reads that body to learn what the client sent.
Two Common Body Types
Most bodies are either an HTML form submission or a JSON payload from an API client. Flask offers a separate accessor for each.
All lessons in this course
- Declare Allowed Methods on a Route
- Branch Logic by request.method
- Read POST Data from the Body
- 405 Method Not Allowed Explained