Last Updated: June 20, 2017
·
68.3K
· rezigned

Specify username and password for curl command

Problem
We want to use curl to access the site that required http authentication.

Solution

curl -u username:password http://example.com