REST API 404: Bad URI, or Missing Resource?

前端 未结 9 2168
感动是毒
感动是毒 2020-12-04 05:40

I\'m building a REST API, but I\'ve encountered a problem.

It seems that accepted practice in designing a REST API is that if the resource requested doesn\'t exist,

9条回答
  •  不知归路
    2020-12-04 05:47

    404 is just the HTTP response code. On top of that, you can provide a response body and/or other headers with a more meaningful error message that developers will see.

提交回复
热议问题