HTTP is the set of rules that lets software exchange messages over the web. A client such as a browser sends a well-formed request to a server. section 5.3.1
A typical HTTP-based API interaction includes:
- A URL combines a base address with an endpoint that identifies the request type. section 5.3.1
- GET requests can carry key-value parameters in the URL, while POST requests can carry them in a request payload. section 5.3.1
- Headers can carry additional information such as an API key, and responses often use JSON. section 5.3.1
Requesting a forecast
A weather API might use https://api.weathersite.com/forecast?date=2024-08-01. The response can contain high and low temperatures together with forecast text in JSON.







