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 details)
File details
Details for the file httpie-nsof-0.1.tar.gz
.
File metadata
- Download URL: httpie-nsof-0.1.tar.gz
- Upload date:
- Size: 2.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
8b61fded0bb1df90b28bc6466d50fdd9b14fedc90bbe9d0cf4dc6541879fb80b
|
|
MD5 |
7eb3a1210f364b33b3e592e7a2a4a09e
|
|
BLAKE2b-256 |
b247d627fad24872ff691d9c143b49bafa72f5987b3000098619687afeeda8bd
|