mirror of
https://github.com/puppetlabs/vmfloaty.git
synced 2026-01-25 21:28:40 -05:00
Simplify token requests
This commit is contained in:
parent
c9dd50716e
commit
562b811867
1 changed files with 1 additions and 4 deletions
|
|
@ -6,10 +6,7 @@ class Auth
|
|||
def self.get_token(verbose, url, user, password)
|
||||
conn = Http.get_conn_with_auth(verbose, url, user, password)
|
||||
|
||||
resp = conn.post do |req|
|
||||
req.url '/token'
|
||||
req.headers['Content-Type'] = 'application/json'
|
||||
end
|
||||
resp = conn.post "/token"
|
||||
|
||||
resp_body = JSON.parse(resp.body)
|
||||
if resp_body["ok"]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue