Sha256: bccb93a0aab8d8cc8657e19f6d4e445df85aa377b1ca231962622698360d413d
Contents?: true
Size: 509 Bytes
Versions: 13
Compression:
Stored size: 509 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. # # https://gitlab.com/os85/httpx/wikis/Authentication#authentication # module Authentication module InstanceMethods def authentication(token) with(headers: { "authorization" => token }) end end end register_plugin :authentication, Authentication end end
Version data entries
13 entries across 13 versions & 1 rubygems