HTTP & JSON: the API Building Blocks
Every web API is made of two things: HTTP carries the message, JSON carries the data. Learn both well enough to read any API call with confidence.
Download EPUB- HTTP, the Transport A web API rides on HTTP: every call is a request (method + URL + headers) and a response (status code + headers + body). Here's the API-shaped recap.
- JSON, the Data Format JSON is structured data written as text: objects, arrays, strings, numbers, booleans, and null. It won because it's human-readable and language-neutral. Here's how to read and write it.
- A Real API Call Put HTTP and JSON together: GET a JSON API and read the response, then POST a JSON body with the right headers. Annotated curl transcripts of both.