Designing a URI for the current user in REST applications

I need a URI in my REST API to retrieve the current logged in user. I usually use GETa resource with an identifier, but the client does not know the user ID.

I found the following solutions:

RESTful? ?

+32
2

. REST.

* , , :

5.2.1.1

REST - . , , : , (, " -" ), , (, ) .., , , , . , , . [...]

/me, /users/me, /users/myself, /users/current , , , .

/users/{username}.

, (me/self), REST?


* REST, 5 - .

+24

RESTful. REST URI, RESTfully.

REST - . , . URL- .

-3

Source: https://habr.com/ru/post/1670517/


All Articles