Sha256: efb161d215e2b27acca5423ed7170fccdc507f0cf7e3ed5f0bf5899d0f9daf8e
Contents?: true
Size: 520 Bytes
Versions: 55
Compression:
Stored size: 520 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/honeyryderchuck/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
55 entries across 55 versions & 1 rubygems