Join 60,000+ competitive exam aspirants
Which HTTP method is typically used to send data to a server to create or update a resource?
GET
POST
HEAD
OPTIONS
POST
The HTTP POST method is designed to request that the web server accept the data enclosed in the request body as a new subordinate of the resource identified by the Request-URI. It is commonly used for submitting forms, uploading files, or creating new resources on a server.
RFC 9110: HTTP Semantics
The HTTP POST method is designed to request that the web server accept the data enclosed in the request body as a new subordinate of the resource identified by the Request-URI. It is commonly used for submitting forms, uploading files, or creating new resources on a server.
1POSTтАЛтЯ╣Non-idempotent┬аoperation
1GETтАЛтЯ╣Idempotent┬аoperation
When a client sends a POST request, the data is transmitted in the body of the HTTP message rather than in the URL parameters. The server processes this data based on the request content type (e.g., application/x-www-form-urlencoded or multipart/form-data) to perform actions like database insertion or state changes.
POST requests are non-idempotent; multiple identical requests may result in multiple resources being created.
Data sent via POST is not cached by browsers by default.
There is no formal restriction on the size of the data sent in a POST request body, unlike URL-based methods.
POST is considered safer than GET for sensitive data because it is not typically stored in browser history or server logs in the URL.
Supports large volumes of data transmission.
Compatible with various data formats (JSON, XML, binary).
Provides a secure way to transmit data compared to exposing parameters in the URL.
Non-idempotent nature makes it risky to retry without handling side effects.
POST requests are not easily bookmarkable by users.
Form data submission
API resource creation (RESTful services)
File uploads to servers
| Feature | GET | POST |
|---|---|---|
Visibility in URL | Yes (Visible) | No (Hidden in Body) |
Idempotency | Yes (Idempotent) | No (Non-idempotent) |
GET: Used primarily to request data from a server; parameters are appended to the URL.
HEAD: Identical to GET, but the server returns only the headers without the body; used for checking resource existence or metadata.
OPTIONS: Used to describe the communication options for the target resource, returning the allowed HTTP methods.
RFC 9110 provides the current standard for HTTP semantics replacing the older RFC 7231.
B is correct тАФ The POST method is specifically architected to send data to the server to create or update resources while keeping the request payload in the message body.
Remember that POST is non-idempotent, whereas GET, PUT, and DELETE (usually) are idempotent; this is a frequently asked distinction in competitive exam interviews.