GET vs POST
A GET request only reads, and its details ride in the address. A POST request sends new data in its body and often creates something. Send a GET twice and nothing changes; send a POST twice and you may get two orders.
GET Request
A web request that only reads. It asks for data and changes nothing.
A GET request asks a server to send something back without changing anything. Loading a web page, a picture or a list of products is a GET. Any extra details go in the address, because a GET has no body. GET requests are safe to repeat, so browsers and caches may send or store them freely. It is the most common method on the web.
POST Request
A web request that sends new data. It often makes something new.
A POST request sends new data to a server, often to create something. Signing up, placing an order and posting a comment are all POSTs. The data rides in the request body, often as JSON or form fields. Sending the same POST twice can create two copies, so it is not safe to repeat blindly. That is why a browser asks before it sends a form again.
In one line
- GET Request
- A web request that only reads. It asks for data and changes nothing.
- POST Request
- A web request that sends new data. It often makes something new.