Verify API behavior for different HTTP methods
Preconditions (2)
Step 1: Send a GET request to https://api.example.com/items
Step 2: Verify the response status code is 200
Step 3: Send a POST request to https://api.example.com/items with JSON body {"name": "NewItem"}
Step 4: Verify the response status code is 201 and response body contains the new item
Step 5: Send a PUT request to https://api.example.com/items/1 with JSON body {"name": "UpdatedItem"}
Step 6: Verify the response status code is 200 and response body reflects the update
Step 7: Send a DELETE request to https://api.example.com/items/1
Step 8: Verify the response status code is 204 and the item is deleted
✅ Expected Result: Each HTTP method performs its intended action: GET retrieves items, POST creates a new item, PUT updates an existing item, DELETE removes an item, with correct status codes and responses.