Skip to main content
edited title
Link
Dave Jarvis
  • 31.3k
  • 43
  • 186
  • 326

What method should I use for a login (authentication) request?

improve formatting
Source Link
greg0ire
  • 23.3k
  • 17
  • 76
  • 104

I would like to know which http method I should use when doing a login request, and why? Since this request creates an object (a user session) on the server, I think it should be POST, what do you think? Same But since the login request should be idempotent, it could be PUT, couldn't it?

Same question for a logout request, should I use the DELETE method?

I would like to know which http method I should use when doing a login request, and why? Since this request creates an object (a user session) on the server, I think it should be POST, what do you think? Same question for a logout request, should I use the DELETE method?

I would like to know which http method I should use when doing a login request, and why? Since this request creates an object (a user session) on the server, I think it should be POST, what do you think? But since the login request should be idempotent, it could be PUT, couldn't it?

Same question for a logout request, should I use the DELETE method?

Source Link
greg0ire
  • 23.3k
  • 17
  • 76
  • 104

What method should I use for a login request?

I would like to know which http method I should use when doing a login request, and why? Since this request creates an object (a user session) on the server, I think it should be POST, what do you think? Same question for a logout request, should I use the DELETE method?