Match each REST-style method to the most common intent.
Drag a concept onto its matching description — or click a concept then click the description.
Retrieve information
Create or submit data
Update or replace a resource
Remove a resource
Trap 1: GET - Create a new resource
GET is explicitly designed for safe retrieval, and its use for creation is incorrect because GET requests must not cause any side effects on the server—clients, proxies, and caches assume they are read-only. Creating a resource via GET would break the uniform contract of HTTP, leading to problems such as unintended resource creation from link prefetching, browser history, or web crawlers. Additionally, GET requests are not intended to carry complex payloads for entity creation; POST is the standard method for transmitting data that results in a new resource. RESTful APIs should rely on POST (and sometimes PUT) for creation semantics.
Trap 2: POST - Retrieve a resource
POST is defined for submitting data to be processed, typically resulting in the creation of a new resource or the triggering of a server-side action. Unlike GET, POST is neither safe nor idempotent, as each invocation can produce different outcomes or side effects. Using POST to merely retrieve a resource would violate the uniform interface principle of REST, because the server would need to interpret the request as a retrieval despite the method's established semantics. The correct retrieval method is always GET, which is explicitly designed for read-only operations.
Trap 3: PUT - Partially update a resource
PUT is intended to replace the entire representation of a target resource with the request payload, making it an idempotent operation—repeated identical PUT requests yield the same state. A partial update is specifically handled by PATCH, which applies a set of changes described in the request body without replacing the whole resource. Therefore, using PUT for a partial update misrepresents the method's semantics and can lead to unintended data loss if the full representation is not supplied. The distinction between PUT and PATCH is critical in RESTful API design.
- A
GET - Retrieve a resource
GET is the proper HTTP method for retrieving a resource because it is defined as safe and idempotent, meaning it produces no side effects on the server and can be repeated safely. The request is sent without a body, and the server returns the current state of the resource identified by the URI. GET responses are cacheable, which is essential for efficient network operations. This aligns with the REST architectural constraint of using standardized methods for their intended semantic purpose.
- B
GET - Create a new resource
Why wrong: GET is explicitly designed for safe retrieval, and its use for creation is incorrect because GET requests must not cause any side effects on the server—clients, proxies, and caches assume they are read-only. Creating a resource via GET would break the uniform contract of HTTP, leading to problems such as unintended resource creation from link prefetching, browser history, or web crawlers. Additionally, GET requests are not intended to carry complex payloads for entity creation; POST is the standard method for transmitting data that results in a new resource. RESTful APIs should rely on POST (and sometimes PUT) for creation semantics.
- C
POST - Retrieve a resource
Why wrong: POST is defined for submitting data to be processed, typically resulting in the creation of a new resource or the triggering of a server-side action. Unlike GET, POST is neither safe nor idempotent, as each invocation can produce different outcomes or side effects. Using POST to merely retrieve a resource would violate the uniform interface principle of REST, because the server would need to interpret the request as a retrieval despite the method's established semantics. The correct retrieval method is always GET, which is explicitly designed for read-only operations.
- D
PUT - Partially update a resource
Why wrong: PUT is intended to replace the entire representation of a target resource with the request payload, making it an idempotent operation—repeated identical PUT requests yield the same state. A partial update is specifically handled by PATCH, which applies a set of changes described in the request body without replacing the whole resource. Therefore, using PUT for a partial update misrepresents the method's semantics and can lead to unintended data loss if the full representation is not supplied. The distinction between PUT and PATCH is critical in RESTful API design.