Introduction
If you are like me, HTTP requests can be confusing at first. But hopefully with this guide, things might be a little easier for you when learning requests and how to use them.
A helpful tool for learning and practicing HTTP requests in my experience would be Requestbin.
Now, let's get started with the methods.
GET
GET is used when reading or retrieving resources. When the GET request is sucessful, it will return a response with the resource you requested.
POST
POST sends data to the server, usually to create a resource or update an existing resource.
PUT
PUT also creates a resource or updates an existing resource similar to POST, but PUT requests can be called multiple times and will remain the same. This means that PUT requests are idempotent.
DELETE
DELETE will remove the requested resource.
Other HTTP request methods
Here are more resources you can use to learn HTTP methods, including the ones that I did not cover in this post.
You can read about these methods here.
Rapid API - HTTP Request Methods
And more sources all across the web can help!
Top comments (1)
Well explained, couldn't explain it myself any better