HTTP Methods GET Vs POST
HTTP Methods GET Vs POST
w3schools.com
The two most common HTTP methods are: GET and POST.
What is HTTP?
The Hypertext Transfer Protocol (HTTP) is designed to enable communications between
clients and servers.
A web browser may be the client, and an application on a computer that hosts a web
site may be the server.
Example: A client (browser) submits an HTTP request to the server; then the server
returns a response to the client. The response contains status information about the
request and may also contain the requested content.
HTTP Methods
GET
POST
PUT
HEAD
https://www.w3schools.com/tags/ref_httpmethods.asp 1/8
5/4/2020 HTTP Methods GET vs POST
DELETE
PATCH
OPTIONS
Note that the query string (name/value pairs) is sent in the URL of a GET request:
/test/demo_form.php?name1=value1&name2=value2
The data sent to the server with POST is stored in the request body of the HTTP request:
https://www.w3schools.com/tags/ref_httpmethods.asp 2/8
5/4/2020 HTTP Methods GET vs POST
The difference between POST and PUT is that PUT requests are idempotent. That is,
calling the same PUT request multiple times will always produce the same result. In
contrast, calling a POST request repeatedly have side effects of creating the same
resource multiple times.
In other words, if GET /users returns a list of users, then HEAD /users will make the
same request but will not return the list of users.
HEAD requests are useful for checking what a GET request will return before actually
making a GET request - like before downloading a large file or response body.
https://www.w3schools.com/tags/ref_httpmethods.asp 3/8
5/4/2020 HTTP Methods GET vs POST
GET POST
❮ Previous Next ❯
https://www.w3schools.com/tags/ref_httpmethods.asp 4/8
5/4/2020 HTTP Methods GET vs POST
COLOR PICKER
HOW TO
Tabs
Dropdowns
Accordions
Side Navigation
Top Navigation
Modal Boxes
https://www.w3schools.com/tags/ref_httpmethods.asp 5/8
5/4/2020 HTTP Methods GET vs POST
Progress Bars
Parallax
Login Form
HTML Includes
Google Maps
Range Sliders
Tooltips
Slideshow
Filter List
Sort List
SHARE
CERTIFICATES
HTML
CSS
JavaScript
SQL
Python
PHP
jQuery
Bootstrap
XML
Read More »
https://www.w3schools.com/tags/ref_httpmethods.asp 6/8
5/4/2020 HTTP Methods GET vs POST
REPORT ERROR
PRINT PAGE
FORUM
ABOUT
Top Tutorials
HTML Tutorial
CSS Tutorial
JavaScript Tutorial
How To Tutorial
SQL Tutorial
Python Tutorial
W3.CSS Tutorial
Bootstrap Tutorial
PHP Tutorial
jQuery Tutorial
Java Tutorial
C++ Tutorial
Top References
HTML Reference
CSS Reference
JavaScript Reference
SQL Reference
https://www.w3schools.com/tags/ref_httpmethods.asp 7/8
5/4/2020 HTTP Methods GET vs POST
Python Reference
W3.CSS Reference
Bootstrap Reference
PHP Reference
HTML Colors
jQuery Reference
Java Reference
Angular Reference
Top Examples
HTML Examples
CSS Examples
JavaScript Examples
How To Examples
SQL Examples
Python Examples
W3.CSS Examples
Bootstrap Examples
PHP Examples
jQuery Examples
Java Examples
XML Examples
Web Certificates
HTML Certificate
CSS Certificate
JavaScript Certificate
SQL Certificate
Python Certificate
jQuery Certificate
PHP Certificate
Bootstrap Certificate
XML Certificate
Get Certified »
W3Schools is optimized for learning, testing, and training. Examples might be simplified to improve reading
and basic understanding. Tutorials, references, and examples are constantly reviewed to avoid errors, but we
cannot warrant full correctness of all content. While using this site, you agree to have read and accepted our
terms of use, cookie and privacy policy. Copyright 1999-2020 by Refsnes Data. All Rights Reserved.
Powered by W3.CSS.
https://www.w3schools.com/tags/ref_httpmethods.asp 8/8