HTTP
Last updated
Was this helpful?
Last updated
Was this helpful?
HTTP is a protocol for transmitting resouces such as HTML.
It follows a client-server model where a client (such as a web browser) opens a connection with a web server and makes a request for a resource (such as the homepage/index.html) and then waits for a response from the server.
In HTTP/1.1, the client and server communicate via plain text using a similar format:
Request Message
Response Message
HTTP Methods describe the operation the client wants the server to do. Common methods include GET
, POST
, PUT
, PATCH
, and DELETE
.
The GET
method is used to fetch (read) data from the server. More on the other methods and their uses on MDN and in future classes.
HTTP response status codes indicate if an HTTP request has successfully completed or not. Status codes are grouped in five ranges:
100-199
Informational
200-299
Success
300-399
Redirect
400-499
Client Error
500-599
Server Error