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?
Asked
Active
Viewed 265 times
1 Answers
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?
Omelian Levkovych
- 300
- 1
- 10