1

Since I will not be creating a session and simply just getting the user with the specified username and password should I use GET instead of POST?

  • 1
    It's not exactly clear what you mean by "just getting the user with the specified username and password" or what you're trying to do at the game end? – craftworkgames Dec 10 '20 at 03:40

1 Answers1

4

Does the endpoint needs to receive any sensitive data from your request?

If yes, I would strongly recommend to use POST method in this case.

The first reason for that is that GET method, in case you are providing some data (e.g: username, password) will contain it in the query string. However, post will put it to the body of your request.

Also some differences to be aware of:

  • GET requests can be cached
  • GET requests remain in the browser history
  • GET requests can be bookmarked

Some similar question you can see here For Login GET or POST?