Fundamental protocol for communication between web browsers and web servers
HTTP
Shared language that allows a browser to:
1. talk to a server
2. receive information from it
HTTP
Client opens a connection to a server to make a request, and waits for the server to send back a response
Client-server model
The message a client send to a server to ask for something. It contains information that tells the server what the client wants to do
HTTP request
Are the verbs of the HTTP language, they tell the server what action to perform
Request methods
Method for retrieving data
GET
Method for submitting data
POST
Are used to send additional information or metadata about the request. They act like notes attached to the message that help the server understand the client and process correctly
Headers
They describe rhe behavior of the client, providing details like the type pf browser being used or the formats it can accept
Headers
The server’s reply to a client’s request
HTTP response
HTTP status codes
Infromational responses (1)
Successful responses (2)
Redirections (3)
Client errors(4)
Server errors (5**)
The server has received the request and is processing it
Infromational response (1**)
The request succedded and everything is fine
Successful response (2**)
The resource you wany has moves, and the server is telling you where to find it
Redirections (3**)
The server could not fine the requested resource
Client errors (4**)
Something went wrong on the server’s end
Server errors (5**)
Status code for Continue
100
Status code for OK
200
Status code for Moved Permanently
301
Status code for Not Found
404
Status code for Internal Server Error
500
Common response header
Content-Type
Type of response header that tells the browser what kind of document is beng sent so the browser knows how to process and display it correctly
content-type