Skip to content
BENIBIX Learn

POST Request

Infrastructure🌐 NetworkingRequests and Responses

Also known as POST, HTTP POST, POST Method

A web request that sends new data. It often makes something new.

Think of it like

Think of it like a postbox. You drop in a letter with something new for them to keep.

Example

Emma fills in a sign-up form and presses the button. Her browser sends a POST with her name and email, and the server makes her account.

Why it matters

Most forms, uploads and new records reach a server by POST.

Definition

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.

Example code

http
POST /api/users HTTP/1.1
Host: example.com
Content-Type: application/json

{"name": "Emma"}
The new user's details travel in the body, after the blank line.

Common mistake

Letting a double click send the same POST twice. The shop then takes two orders and two payments.

Key takeaways

  1. 1
    Sends new data. Often to create a thing.
  2. 2
    Data in the body. JSON or form fields.
  3. 3
    Not safe to repeat. Twice can mean two copies.

Compare

Learn it properly