Curling With Basic Auth Credentials
I often use curl
to take a quick look at the responses of particular endpoints. If I try to curl
a URL that is secured with HTTP Basic Authentication, this is what the response looks like:
I can give the credentials to curl
so that it can plug them in as it makes the request using the -u
(or --user
) flag:
If I don't want the password showing up in my command-line history, I can just provide the username and curl
will prompt me for my password:
See man curl
for more details.
Last updated