Module: HTTPX::Plugins::Auth::RequestMethods

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

Instance Method Summary collapse

Instance Method Details

#authorize(auth_value) ⇒ Object



84
85
86
87
88
89
90
# File 'lib/httpx/plugins/auth.rb', line 84

def authorize(auth_value)
  if (auth_type = @options.auth_header_type)
    auth_value = "#{auth_type} #{auth_value}"
  end

  @headers.add("authorization", auth_value)
end