lib/httpx/plugins/authentication.rb in httpx-0.3.1 vs lib/httpx/plugins/authentication.rb in httpx-0.4.0
- old
+ new
@@ -1,8 +1,12 @@
# frozen_string_literal: true
module HTTPX
module Plugins
+ #
+ # This plugin adds a shim #authentication method to the session, which will fill
+ # the HTTP Authorization header.
+ #
module Authentication
module InstanceMethods
def authentication(token)
headers("authorization" => token)
end