Is it legal to have REST resource such as /currentUser in terms of RESTful and stateless?

前端 未结 5 1386
无人及你
无人及你 2021-02-09 17:11

In terms of RESTful and stateless it\'s pretty legal to have resource like

/users/123

But, the question is: is it legal to have resource that omits user id and

5条回答
  •  悲&欢浪女
    2021-02-09 17:44

    It is OK as long as you use only the data from request (HTTP Headers in your case). In other words, this may work only for users that pass authentication.

提交回复
热议问题