HTTP 200 or 404 for empty list?

前端 未结 4 1647
旧巷少年郎
旧巷少年郎 2021-02-13 12:30

I know this is a fairly common question, but I haven\'t found an answer that satisfies me.

I\'ve been using django rest framework for a while now, but this is mostly irr

4条回答
  •  温柔的废话
    2021-02-13 13:22

    1. Because we are ok with an empty page1, not ok with an empty page2.

    This is driven by the UI consideration (page1 must exist!), nevertheless, it decides the response code.

提交回复
热议问题