What is a POST request?
A POST request is an HTTP request that sends data to a server, usually to create something new. When you submit a sign-up form, make a purchase, or send a message, the browser is almost certainly making a POST request under the hood.
POST sends data in the request body rather than the URL, unlike a GET request. This keeps the data out of browser history and server logs, and allows you to send much larger payloads. A form submission, a JSON object, a file upload. All of these travel in the POST body.
POST requests are not idempotent. Sending the same POST request twice will typically create two records. This is why browsers warn you with “Are you sure you want to resubmit this form?” when you refresh a page after a form submission. It’s trying to prevent an accidental duplicate POST.
In REST APIs, POST is the standard method for creating new resources. If you’re building an API and someone sends a POST to /users, the expected behavior is to create a new user and return it.