How to change or remove the Request Payload form-data of the last request as it is visible in plain text.

I want to send username and password over an HTTP/HTTPS post request encrypted or securely to the server (with the help of java and javascript or simple HTTP/HTTPS post request) so that hacker or attacker (access to the client browser) not able to see HTTP/HTTPS post data with the help of the browser developer tools in Request Payload after the successful login or unsuccessful login attempt.
I have tried HTTPS also with spring-boot, tomcat with my own custom certificate.
But the same result as form-data is visible in Request Payload in chrome dev-tools.