Nsof OAuth 2 plugin for HTTPie.
Project description
Nsof OAuth 2 plugin for the HTTPie command line HTTP client.
Installation
$ python setup.py install
You should now see nsof under --auth-type in $ http --help output.
Usage
$ http --auth-type=nsof --auth='org/username:password' https://api.nsof.io/v1/users
You can also use HTTPie sessions:
# Create session
$ http --session=logged-in --auth-type=nsof --auth='org/username:password' https://api.nsof.io/v1/users
# Re-use auth
$ http --session=logged-in POST https://api.nsof.io/v1/users
You can set the default --auth-type=nsof option in the ~/.httpie/config.json file for convenience:
$ echo '{"default_options": ["--auth-type=nsof"]}' > ~/.httpie/config.json
$ http -a org/username:password https://api.nsof.io/v1/users
You can also set your org, username, password as default:
$ echo '{"default_options": ["--auth-type=nsof", "--auth=nsof/username:password"]}' > ~/.httpie/config.json
$ http https://api.nsof.io/v1/users
It’s possible to pass a different effective org using the env EORG:
$ EORG=nsof http https://api.nsof.io/v1/users
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
httpie-nsof-0.1.tar.gz
(2.5 kB
view hashes)