xh -a alice:secret https://api.example.com

Category: Web App Development

xh -a alice:secret https://api.example.com

Send basic auth with the xh client

Adds a basic auth header built from the username and password pair. The -a flag matches HTTPie's auth shorthand, including bearer tokens via -A bearer. All xh flags mirror HTTPie so muscle memory carries over.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.