Görüyorum ki adblocker kullanıyorsun
Press "Enter" to skip to content

What are HTTP Methods?

In today’s article, we will look at the website requests that we use frequently during the day but do not pay much attention to the background. When we go to our computer, we visit many websites, whether for business or a research, this occurs when we need to communicate with the site during our visits. Well, have you ever wondered how this communication happened? Let’s take a look together.

What is http?

First, let’s take a look at the http concept. HTTP, which is short for Hyper Text Transfer Protocol, was first published in 1991 with the v0.9 version. When we come to 2018, it continues to develop with v3.0.

YılHTTP versiyonu
19910.9
19961.0
19971.1
20152.0
20183.0
HTTP versiyon tablosu

It works as a request-response protocol between client and server. In other words, when you make a request to a site (client), it transmits the data corresponding to your request by the server in response to you. It acts as a bridge between server and client.

Today, the safer version is frequently used as Https. We see this in abundance on e-commerce sites or websites that allow online payments.

The letter s at the end comes from the English security word security. Here, the information is encrypted while being transferred.

What about Http Methods?

I mentioned that Http acts as a bridge between the server and the client. There are several methods used when fulfilling requests. Let’s take a closer look at them.

What is the get method?

We request information from the server with the get method. One of the most common HTTP methods, fast but not secure. When we make a request with the get method, we can clearly view this request on the browser, which causes major security problems.

http:kenanyaman.com/test/demo_form.php?name1=value1&name2=value2

If we assume that there are two fields on our site and we receive data from these fields, we will see such an image in the address line of the browser we use.

If we use the Post method, which is a safer way, instead, the data we send will not be displayed in the address line and we will have a healthier communication.

What is the post method?

Get and Post methods are the two most commonly used Http methods. Since the information is transmitted clearly in the get engine, the Post method is used for user transactions or transactions that must be confidential.

When we use the Post method, the requests we make are sent through the browser in secret.

POST /test/demo_form.php HTTP/1.1
Host: kenanyaman.com
name1=value1&name2=value2

The information to be sent with the Post method is included in the body of the message, so no information is displayed on the url address. When you want to go to the previous page after filling out a form on a site, we will see a warning. This is due to the fact that you do not want to upload the information sent to the server repeatedly with the Post method.

What is the put method?

It is used to send data on the requested server. In this respect, it is similar to get and post. The difference with Post is that when we make a request using the Put method, we always return the same result. When we use post, we repeat a certain process continuously. For example, we can provide a data entry in a form field with a continuous post, every time we make a request, we send the same data over and over again. There will be no change in the put method.

What is the head method?

It is the same as the get method, only there is no response body in the request. It is a method used if we request the title rather than its content on the server we request.

What is the delete method?

With this method, you can delete data on the server. In a request you make with this method, you can send the defined data id value and delete the data corresponding to that id value through the server.

We saw the frequently used HTTP methods, see you in the next article …

Resources:

  • https://www.w3schools.com/tags/ref_httpmethods.asp
  • https://medium.com/@mbilgil0/http-metotlar%C4%B1-http-request-methods-90d57d574dfa
  • https://developer.mozilla.org/tr/docs/Web/HTTP/metotlar

Be First to Comment

    Leave a Reply