HTTP and HTTPS
How browsers talk.
Once your browser knows the address, it talks to the server in HTTP. Every request has a method, a path, some headers, and sometimes a body. Every response has a status code.

- Method and path
- Headers and body
- A status code back
Status codes
Status codes tell you what happened. The two hundreds mean success. Two hundred is OK, and two oh one means something was created. The three hundreds mean go somewhere else. The four hundreds mean the client made a mistake, like four oh four, not found. And the five hundreds mean the server failed.
| Code | Meaning |
|---|---|
| 200 OK | it worked |
| 201 Created | new thing made |
| 301 / 302 | go somewhere else |
| 404 Not Found | client asked for nothing |
| 500 / 503 | server failed |
HTTP vs HTTPS
Plain HTTP sends everything as readable text, so anyone on the network can read or change it. HTTPS wraps the same messages in TLS encryption. It also proves the server is really who it says it is, using a certificate. Today, every public site should use HTTPS.
HTTP
- Readable by anyoneCan be changedNever for real users
HTTPS
- Encrypted with TLSServer proves identityUse it everywhere
Summary
HTTP carries requests and responses, and status codes say what happened. HTTPS adds encryption and identity. Next, the two ways data travels underneath. TCP and UDP.
Key takeaways- Method, path, headers, body
- 2xx ok, 4xx client, 5xx server
- Always HTTPS