Module: HTTPX::Plugins::Auth::InstanceMethods

Defined in:
lib/httpx/plugins/auth.rb

Instance Method Summary collapse

Instance Method Details

#authorization(token) ⇒ Object



14
15
16
# File 'lib/httpx/plugins/auth.rb', line 14

def authorization(token)
  with(headers: { "authorization" => token })
end

#bearer_auth(token) ⇒ Object



18
19
20
# File 'lib/httpx/plugins/auth.rb', line 18

def bearer_auth(token)
  authorization("Bearer #{token}")
end