# HTTP and REST in Plain Words

Learn the conversation every API has: a request with a method, an address, headers and a body, and a response with a status code, headers and a body. You'll read status codes as sentences, design endpoints the REST way, and answer a community garden's requests by hand in plain Python, so you see exactly what a framework takes over.

Updated: November 19, 2026

## [HTTP in Plain Words](https://www.ask-codey.com/courses/python-web-apis/topics/fastapi-http-in-plain-words)

1. [HTTP in Plain Words: Requests and Responses](https://www.ask-codey.com/lessons/fastapi-http-requests-and-responses) (Apprentice): An app that asks an API for something sends an HTTP request with a method, a URL, headers and sometimes a body, and gets back a response with a status code, headers and usually a body, and Python's urllib.parse splits a URL into its path and its query values.
2. [Status Codes and Headers](https://www.ask-codey.com/lessons/fastapi-http-status-codes-and-headers) (Apprentice): A response's three-digit status code tells the app how its request went before it reads a word of the body, its first digit names the family (2xx it worked, 3xx look elsewhere, 4xx the request has a problem, 5xx the server broke), and headers such as Content-Type tell the app how to read the body.

## [REST in Plain Words](https://www.ask-codey.com/courses/python-web-apis/topics/fastapi-rest-in-plain-words)

1. [REST: Resources, Endpoints and Methods](https://www.ask-codey.com/lessons/fastapi-rest-resources-and-endpoints) (Apprentice): A REST API names each kind of thing it holds with a plural noun, such as /plots for every plot and /plots/7 for one, lets the HTTP method be the verb, answers each action with the status code that fits it, and never changes anything on a GET.
2. [Routing by Hand, and Why Frameworks Exist](https://www.ask-codey.com/lessons/fastapi-http-routing-by-hand) (Apprentice): A plain Python function can answer requests by checking each one's method and path with if statements and returning a status code and a body, and seeing that code grow with every route shows the jobs a framework such as FastAPI takes over.

## [Exercise: Community Garden Requests](https://www.ask-codey.com/courses/python-web-apis/topics/exercise-fastapi-community-garden-requests)

1. [Exercise: Community Garden Requests](https://www.ask-codey.com/lessons/exercise-fastapi-community-garden-requests) (Apprentice): Answer Greenleaf Community Garden's requests by hand in plain Python, with a function that reads each request's method, path and query string and returns the right status code and body, a 404, 400 or 405 included, and let pytest check every answer.

Source: https://www.ask-codey.com/courses/python-web-apis/chapters/fastapi-http-and-rest
