HTTP methods (also called verbs) describe the action you want to perform on a resource. The four you will use most map neatly onto the classic create, read, update, delete operations.
| Method | Action | Typical use |
|---|---|---|
| GET | Read | Retrieve a resource; should not change data |
| POST | Create | Create a new resource |
| PUT | Update/replace | Replace an existing resource |
| PATCH | Partial update | Modify part of a resource |
| DELETE | Delete | Remove a resource |
Safe and idempotent
Two properties matter when testing. A safe method does not change data (GET). An idempotent method gives the same result no matter how many times you repeat it (GET, PUT, DELETE). POST is neither — calling it twice usually creates two resources.
Test idea: verify that GET never alters data, that DELETE twice behaves sensibly (second call returns not-found), and that PUT is truly idempotent. These properties are common sources of real bugs.
Conclusion
The HTTP methods define the intent of each call, and their safe/idempotent properties give you concrete behaviours to test. Knowing which verb does what is essential for designing correct, meaningful API tests.