3 ms·
> If a user want to stop using your service, you’ll do this (not so obvious) call: > DELETE /users/1234 No! It would be DELETE /sessions/12345 or possi
by yxhuvud 11y ago
> If a user want to stop using your service, you’ll do this (not so obvious) call:
> DELETE /users/1234
No! It would be
DELETE /sessions/12345
or possibly
DELETE /users/1234/session
or even
DELETE /users/1234/sessions/3
in the case a user can have more than one concurrent different sessions (this is actually a fairly common case for the application we do were I work. We don't use http for this though).
Unless you actually want to permanently stop the user from using the system, in which case
DELETE /users/1234
would be the perfectly obvious choice.