liveBook · Manning

Request message

As explained in Build Python Web Apps with Streamlit

A POST request is an HTTP request that sends data to a server, commonly in a request body.

When an app needs to send data to a server, it can use a POST request. Unlike a lightweight GET request, a POST request commonly places key-value parameters in the request payload, or body. The request also includes a URL and may include headers such as an API key. section 5.3.1

A request combines a request line, HTTP headers, and an optional body. The server processes the message and returns an HTTP response, often containing JSON that application code can parse. section 5.3.1

Calling an API

An API may use a shared base address with an endpoint for a particular operation. A weather API could expose a forecast endpoint, while a POST request sends customizable data as a payload rather than placing every parameter in the URL. section 5.3.1

https://<base address>/<endpoint>

Use the base-address and endpoint pattern to recognize the URL targeted by an API request. section 5.3.1

How Build Python Web Apps with Streamlit covers it

How deep it goes
Defines request parts, contrasts GET and POST, and connects payloads, headers, servers, and responses.
Examples
Uses a weather API, forecast endpoint, date parameter, and JSON response as concrete API examples.
What you can do after
Apply HTTP requests to call APIs and recognize where sent data, headers, and returned results belong.
How it connects
Connects POST requests with APIs, HTTP headers, request payloads, GET requests, JSON, and HTTP responses.

Also explained in

Compare how 14 books explain request message →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Build Python Web Apps with Streamlit. The section links point to the parts of the book it draws on.