Back to All Questions
Question 6 of 100
Basic API Testing
Beginner
Q6: What are HTTP Methods? List Common Verbs.
📡Core Concept
What are HTTP Methods? List Common Verbs.
Key Takeaways & Architecture Summary
- ✓Represent the semantic operations being executed on server resources.
- ✓GET: Retrieve resource representations without dynamic side effects.
- ✓POST: Create a new resource; PUT: Replace or create; DELETE: Remove.
Direct Answer Summary
HTTP methods represent semantic actions executed on target resources. The most common methods are: GET (retrieve data), POST (create a new resource), PUT (replace an existing resource entirely), PATCH (apply partial updates to a resource), and DELETE (remove a resource from the server).
⚠️ Senior Engineering Warning (Red Flag)
Never use GET requests to modify data. GET requests are designed to be idempotent and safe, meaning they should only retrieve data without changing server state.
💡 STAR Architectural Explanation & Pro Tip
Using standard HTTP methods correctly enforces predictability. Clients automatically know how to handle caching, retry logic, and server scaling based on the safety characteristics of each HTTP verb.
RestAssuredTest.java
Rest-Assured + Java// REST-Assured HTTP Verb Mapping Example
RestAssured.given()
.body("{ \"status\": \"completed\" }")
.patch("/api/v1/tasks/99"); // PATCH handles partial resource updates