API Design · Junior · Question 4 of 75
Which HTTP method should create a new resource in a collection, like a new order?
- ✓Correct answer:
POST /orders - 2
GET /orders/new - 3
DELETE /orders
Explanation
The server assigns the ID and usually responds with 201 Created and a Location header pointing to the new resource.