HTTPReqeust post get 방식의 차이


IT Story/네트워크 이야기 2012.08.07 09:56















GET

The Get is one the simplest Http method. Its main job is to ask the server for the resource. If the resource is  available then then it will given back to the user on your browser. That resource may be a HTML page, a sound file, a picture file (JPEG) etc. We can say that get method is for getting something from the server. It doesn't mean that you can't send parameters to the server. But the total amount of characters in a GET is really limited. In get method the data we send get appended to the URL so whatever you will send will be seen by other user so can say that it is not even secure.

POST

The Post method is more powerful request. By using Post we can request as well as send some data to the server. We use post method when we have to send a big chunk of data to the server, like when we have to send a long enquiry form then we can send it by using the post method. 

There are few more rarely used http methods including HEAD, PUT, TRACE, DELETE, OPTIONS and CONNECT.

The HTML specifications technically define the difference between "GET" and "POST" so that former means that form data is to be encoded (by a browser) into a URL while the latter means that the form data is to appear within a message body. But the specifications also give the usage recommendation that the "GET" method should be used when the form processing is "idempotent", and in those cases only. As a simplification, we might say that "GET" is basically for just getting (retrieving) data whereas "POST" may involve anything, like storing or updating data, or ordering a product, or sending E-mail.

GET과 POST의 차이로는 간단하게 데이터를 받아오는 GET과 BODY에 어떤 부분을 넣거나 헤더에 정보를 포함해서 보낼 때에는 POST를 사용한다로 간단하게 정리하면 될 듯 하다. 

저작자 표시 비영리 변경 금지
신고

WRITTEN BY
ShakeJ

0 ,