Famous HTTP Request Methods

Tre'von Mitchell
3 min readMar 2, 2021

What is HTTP?

Hypertext Transfer Protocol allows web-based applications to communicate and exchange data. You can look at HTTP as like a messenger that is in the web world that can send out images, videos, and all types of documents. There’s a server that would inform a request-response and if two computers are speaking both of the requests or protocol. When a computer makes a request, meaning that the computer is the client, there's another computer that is being the server that is going to serve and respond to that request that the client sent. After the client computer makes the request, it’ll disconnect from the server. When the response is ready, the server will reconnect again and send the response. HTTP is also stateless, meaning that the client and server only know about each other during the current request but not when the request closes. If the client and server want to reconnect then they have to provide each other with information. The HTTP was designed for the web to fetch HTML documents and send them to the client. HTTP is also quick to move data on the web. Every HTTP process and interaction will include a request and a response. So how can you use an HTTP request method and how to implement them.

Using HTTP Request Methods and what are they?

HTTP Request has no properties and is known as verbs because they are making some type of action right? yes, they are. The most famous methods that are commonly used are Get, Post, Put, and Delete. They are kind of basic and used throughout the operations for the protocol and comparable to the four basic functions of persistent storage, which is CRUD. CRUD stands for create, read, update, and delete, meaning if you’re working on a website you will create a post when you want to read something on the website you would read the post, when you want to update something you would update it and when you want to delete a post, you would delete it. Below is a list of the famously used HTTP request methods.

The Get method is used to fetch data from the server, which is reading information and request data from a specified resource. Put and Post request methods are used to create and update a resource, Post will create content, and Put will update the content. Post can send data to a resource and create and a new resource. The Delete method is simply deleting a specified resource, just deletes something.

Safe Method and Unsafe Method.

Let’s say you try to access some data from the server, every time you fetch or Get, you’ll get the same data. What if you’re looking or fetching for a certain record, you have a human that has an ID of 101, their name is Nick, and has a sport of football. That’s three parameters and other humans will have different values. When you fetch that human 101 or fetch that data you’re not going to affect the server at all, it's not going to change the data on the server. That is why the Get method is known as being the safe method. Well, what about the Unsafe method? Well delete can be an unsafe method but that doesn’t mean you shouldn’t do it. Put and Post can also be Unsafe but they are mainly Idempotent. Now, what does that mean? Let’s say you have four records and you want to delete one of them and you send a request for the third human that you want to delete. If you were to click on it multiple times trying to delete that human it will not affect your database. Delete and Put methods are known as Idempotent meaning if they are used multiple times they will not affect the server.

--

--