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 possiblesh
curlz -- -u "{{ 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 }}" }'
{{ prompt_for("Username") }}
or {{ prompt_for("Birthdate") }}
sh
curlz -- -u "{{ prompt_for("Username") }}:{{ prompt_password() }}" https://api.github.com/user
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/{{ lang | title }}'
sh
curlz r --define lang=Rust --bookmark 'https://api.github.com/gitignore/templates/{{ lang | title }}'
Saving this request as a bookmark:
Please enter a bookmark name: /gitignore
Request bookmarked as: /gitignore`
curlz r /gitignore