Sha256: baed4ec4902b2d3310f40453f3fd3005cd1a345092f09fa5b12f80a512f0778c

Contents?: true

Size: 420 Bytes

Versions: 1

Compression:

Stored size: 420 Bytes

Contents

# 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
      end
    end
    register_plugin :authentication, Authentication
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
httpx-0.4.0 lib/httpx/plugins/authentication.rb