Are you still asking about difference between HTTP request method GET and POST in 2019? Before we dive into it, let's see and compare the difference in their properties and behaviors:

Backward / RefreshNo harmData will be resubmitted (browser should warn user of resubmission)
Encoding Typeapplication/x-www-form-urlencodedapplication/x-www-form-urlencoded
HistoryParameters stored in browser historyParameters not stored in browser history
URL Length 2048 charactersUnlimited
Data Type Restriction ASCII onlyNo restriction. Allow binary data
SecurityUnsafe as data is exposed in URLRelatively safer as parameters will not be stored in browser history or server log.

Please note that most of the browsers comply with the HTTP standard. The table above states the behavior difference between GET and POST on the browser, not the intrinsic difference.

HTTP Message difference between GET and POST

Let's draw the conclusion first, there is no much difference between GET and POST. Both of them are the request method in HTTP protocol, and HTTP protocol is based on TCP/IP application layer. Hence, regardless of whether GET or POST, they both are transmitted on the same application layer abiding the same protocol, so technically speaking, there is no difference in terms of data transmission.

One might be able to spot the first and major difference on the request first line.

GET: GET /uri HTTP/1.1
POST: POST /uri HTTP/1.1

When we want to include parameters, GET method puts parameters into URL while POST method puts parameters into message body.

GET /url?id=1234&value=true HTTP/1.1
Host: localhost
POST /url HTTP/1.1
Host: localhost
Content-Type: application/x-www-form-urlencoded


Essentially, both GET and POST are transmitting with TCP connection. We can use GET and write parameters in URL, or POST with parameters in body, either way is fine as long as the server supports the method.

Post was published on , last updated on .

Like the content? Support the author by!