Correct HTTP status code when resource is available but not accessible because of permissions

后端 未结 4 1449
被撕碎了的回忆
被撕碎了的回忆 2020-12-20 12:18

I am building a RESTful protocol for Dynamic Carpooling applications, for my Computer Science thesis.

In the Protocol I also have to formally specify the HTTP statu

4条回答
  •  难免孤独
    2020-12-20 12:26

    To me I will use 400 Bad request.
    Because my application will not go unaccessable resources in programmatically.
    Filtering users permission and hide unaccessable resources is good user experience in my opinion. If my server got unaccessable request which means some person trying to do something.
    That is why I choose 400 - Bad request in my applications.

提交回复
热议问题