Which method you use when you want to send confidential data
-
doGet
-
doPost
-
Both
-
None of the above
-
All of the above
B
Correct answer
Explanation
doPost should be used when sending confidential data because POST requests place parameters in the request body rather than the URL. This prevents sensitive information from appearing in browser history, server logs, or URL bookmarks. GET requests expose data in the URL query string, which is less secure for confidential information.