I use cURL to test some RESTful APIs. Some of these APIs are served from the Apache machine and are protected by a combination of users and passwords using simple .httaccess files.
cURL
.httaccess
Is there a way to provide cURL a combination of username and password as arguments?
Use this curl function for the command line
-u "User:Password"
More information about this parameter can be found in here .
You can use this curl command, for example:
curl -A "Mozilla" -L 'http://user: password@localhost /api/someapi.php'