module HTTP::Chainable
def basic_auth(opts)
(**opts)
-
:pass
(#to_s
) -- -
:user
(#to_s
) --
Parameters:
-
opts
(#fetch
) --
Other tags:
- See: http://tools.ietf.org/html/rfc2617 -
def basic_auth(opts) user = opts.fetch :user pass = opts.fetch :pass auth("Basic " << Base64.strict_encode64("#{user}:#{pass}")) end