diff options
| author | mokha <mokha@cisco.com> | 2018-11-10 09:47:36 -0700 |
|---|---|---|
| committer | mokha <mokha@cisco.com> | 2018-11-10 09:47:36 -0700 |
| commit | a247acd75e953221cee80262eba278916bb73f8c (patch) | |
| tree | 1ef7fc59d0644f57a569bf12e99448ae94c41753 | |
| parent | 864a74e3a3a0fc3317d1662306bdfce1ec58b298 (diff) | |
update README and bump version.
| -rw-r--r-- | README.md | 18 | ||||
| -rw-r--r-- | lib/net/hippie/version.rb | 2 |
2 files changed, 18 insertions, 2 deletions
@@ -40,7 +40,7 @@ puts JSON.parse(response.body) ```ruby client = Net::Hippie::Client.new body = { user: { name: 'hippie' } } -response = client.post(URI.parse('https://example.com'), body: body) +response = client.post(URI.parse('https://example.org'), body: body) puts JSON.parse(response.body) ``` @@ -63,6 +63,22 @@ client = Net::Hippie::Client.new( ) ``` +### Basic Auth + +```ruby +client = Net::Hippie::Client.new +headers = { 'Authorization' => Net::Hippie.basic_auth('username', 'password') } +client.get('https://www.example.org', headers: headers) +``` + +### Bearer Auth + +```ruby +client = Net::Hippie::Client.new +headers = { 'Authorization' => Net::Hippie.bearer_auth('token') } +client.get('https://www.example.org', headers: headers) +``` + ## Development After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment. diff --git a/lib/net/hippie/version.rb b/lib/net/hippie/version.rb index afbc35d..49e4bb8 100644 --- a/lib/net/hippie/version.rb +++ b/lib/net/hippie/version.rb @@ -2,6 +2,6 @@ module Net module Hippie - VERSION = '0.1.9' + VERSION = '0.1.10' end end |
