There are also several utility HTTP methods
HEAD | Retrieve only headers |
OPTIONS | Retrieve methods supported by the server |
TRACE | Diagnose the request path |
CONNECT | Establish a tunnel between client and server |
The HTTP protocol defines the rules for exchanging information between a client and a server on the Internet.
Every time we open a browser and enter a website address, we send an HTTP request to the server.
The server, in turn, returns an HTTP response with the contents of the requested page.
An HTTP request includes:
An HTTP response contains:
HTTP Method defines what kind of action the server will perform when processing the request.
Method | What to do? | Example |
---|---|---|
GET | Retrieve | Return a web page |
POST | Create | Create a new user during registration |
PUT | Update/Create | Update user settings, if they don’t exist — create them |
PATCH | Partially update | Change the password in the profile |
DELETE | Delete | Delete the user profile |
The client sends an HTTP request to retrieve a web page
GET
https://tester-today.com/protocols
Accept-Language: en
Server processes the request and returns an HTTP response
200 OK
Content-Type: text/html
Page content in HTML format
This is how information is exchanged between a client and a server via the HTTP protocol.
DevTools — these are built-in browser tools for debugging and testing network requests.
View the details of the request that is made when the current page is opened. Page is named "protocols".
Send an HTTP request to the server to store a new fortune cookie message in the warehouse:
Explore the request and response details in DevTools → Network.
Уровень повышен!
Временное предложение
Премиум со скидкой!