Let's say I've a resource articles
at /articles
.
These articles may have related articles, so I fetch them by GETting /articles/{id}/related
.
What should I return is there is no related articles?
I can think of:
404 Not Found
, maybe with an empty collection
204 No Content
200 Found
with an empty collection
Any advices? (please give arguments)
By the way, it may applies to pagination. If I request page 3 of 2, then the page 3 will return an empty set, should It be a 404
?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…