In web development and API design, the choice between GET and POST (and other HTTP methods) is typically guided by the action's nature:
GET is used for retrieving data. It should be idempotent, meaning it doesn't change the state of the server.
POST is used for sending data to the server, like form submissions, which can change the server's state or create new resources.
In the context of logging in, a POST request is appropriate because you're submitting sensitive data (username and password) which should not be exposed in a URL (as would be the case with a GET request) and potentially alters the server's state (e.g., creating a session).
This is a common convention in web development, hence the use of POST for login routes.
GET Request sends data from FORM to SERVER via URL ENCODING