a curl wrapper with placeholder, bookmark and environment powers just like postman but for the terminal
-H | --header
arguments)--
to curl, that makes drop-in-replacement possible{{ prompt_password() }}
curlz r https://api.github.com/user -- -u "{{ username }}:{{ prompt_password() }}"`{{ prompt_for("Username") }}
or {{ prompt_for("Birthdate") }}
curlz -- -u "{{ prompt_for("Username") }}:{{ prompt_password() }}" https://api.github.com/user
jwt_token
or mfa_token
{{ jwt_token(signin_key, signin_secret) }}
, where signin_key
and signin_secret
are first looked up
at the environment file as variable or else taken then as given.
curlz -H "Authorization: Bearer {{ jwt_token(signin_key, signin_secret) }}" -X POST https://api.github.com/user/repos -d '{ "name": "{{ repo_name }}" }'
In this example we're going to download a pre-configured .gitignore
for a given language from GitHub via curl
curl https://api.github.com/gitignore/templates/Rust
curlz r https://api.github.com/gitignore/templates/Rust
curlz r 'https://api.github.com/gitignore/templates/{{ prompt_for("Language") | title }}'
sh
curlz r --bookmark 'https://api.github.com/gitignore/templates/{{ prompt_for("Language") | title }}'
Language: rust
Please enter a bookmark name: gitignore
curlz r gitignore