Appearance
HTTP
HTTP is an application-layer protocol used for communication between clients and servers.
Request
A request usually contains:
- method
- URL
- headers
- optional body
Example:
http
GET /users HTTP/1.1
Host: example.com
Accept: application/jsonResponse
A response usually contains:
- status code
- headers
- optional body
Example:
http
HTTP/1.1 200 OK
Content-Type: application/json