curl without password in command line

By | 2022-01-13

https://stackoverflow.com/questions/20803339/basic-authorization-command-for-curl

Another way is to get Base64 encoded token of “username:password” from any online website like – https://www.base64encode.org/ and pass it as Authorization header of curl as follows:

curl -i -H 'Authorization:Basic dXNlcm5hbWU6cGFzc3dvcmQ=' http://localhost:8080/

Here, dXNlcm5hbWU6cGFzc3dvcmQ= is Base64 encoded token of username:password.