knowledge base


Create a simple request :

$ http

Custom headers and JSON data :

$ http PUT X-API-Token:123 name=John

Submit form :

$ http -f POST hello=World

Combine with fx

GitHub - antonmedv/fx: Command-line tool and terminal JSON viewer 🔥

http POST /api/auth password=secret | fx 'json => json.meta.token' | pbcopy

in order to use the token on the next endpoint we can store the token in a shell variable, because I’m using fish shell so create a variable would be like this

set -l auth_token (pbpaste)
echo $auth_token