HTTP: HTTP Methods

HTTP is based on methods.

Each method used performs a very different action.

The most popular are GET and POST.

GET

GET is the most used method. It’s the one that’s used when you type an URL in the browser address bar, or when you click a link.

It asks the server to send the requested resource as a response.

HEAD is just like GET, but tells the server to not send the response body back. Just the headers.

POST

The client uses the POST method to send data to the server. It’s typically used in forms, for example, but also when interacting with a REST API.

PUT

The PUT method is intended to create a resource at that specific URL, with the parameters passed in the request body. Mainly used in REST APIs

DELETE

The DELETE method is called against an URL to request deletion of that resource. Mainly used in REST APIs

OPTIONS

When a server receives an OPTIONS request it should send back the list of HTTP methods allowed for that specific URL.

TRACE

Returns back to the client the request that has been received. Used for debugging or diagnostic purposes.

Lessons in this unit:

0: Introduction
1: An HTTP request
2: ▶︎ HTTP Methods
3: HTTP Status Codes
4: HTTP Client/Server communication
5: HTTP Request Headers
6: HTTP Response Headers
7: HTTPS
8: HTTP/2
9: HTTP/3
Want to learn more? Check out our courses