0PricingLogin
Flask Academy · Lesson

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

  1. Declare Allowed Methods on a Route
  2. Branch Logic by request.method
  3. Read POST Data from the Body
  4. 405 Method Not Allowed Explained
← Back to Flask Academy