Last Updated: June 20, 2017
·
71.11K
· 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