curl authorization header

C
curl -H "Authorization: token_str" http://www.example.com$ echo -n user:password | base64
Source

Also in C: