API Design · Middle · Question 70 of 75
When is POST /orders/search with a JSON body acceptable instead of GET with query parameters?
- ✓Correct answer: When filters are too complex or long for a URL, or contain sensitive values that shouldn't end up in logs
- 2Never; search must be GET
- 3Always, because POST is faster
Explanation
The trade-off: POST responses aren't cached by default and the operation looks non-idempotent. Document it clearly.