REST API 404: Bad URI, or Missing Resource?

前端 未结 9 2154
感动是毒
感动是毒 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:43

    The Uniform Resource Identifier is a unique pointer to the resource. A poorly form URI doesn't point to the resource and therefore performing a GET on it will not return a resource. 404 means The server has not found anything matching the Request-URI. If you put in the wrong URI or bad URI that is your problem and the reason you didn't get to a resource whether a HTML page or IMG.

提交回复
热议问题