doGet: The GET method will append the key-value pair to the requested URL, because the URL has a limit on the number of characters, which in turn limits the number of parameter values used in the client request, and the parameter values in the request are visible. Therefore, Sensitive information cannot be transmitted in this way.
doPost: The POST method overcomes the limitation of the GET method by placing the request parameter values in the request body. Therefore, the number of parameters that can be sent is limited. Finally, sensitive information passed through POST requests is invisible to external clients.