Module: HTTPX::Plugins::AWSSigV4::InstanceMethods

Defined in:
lib/httpx/plugins/aws_sigv4.rb

Instance Method Summary collapse

Instance Method Details

#aws_sigv4_authentication(**options) ⇒ Object



159
160
161
# File 'lib/httpx/plugins/aws_sigv4.rb', line 159

def aws_sigv4_authentication(**options)
  with(sigv4_signer: Signer.new(**options))
end

#build_requestObject



163
164
165
166
167
168
169
170
171
172
173
174
175
# File 'lib/httpx/plugins/aws_sigv4.rb', line 163

def build_request(*)
  request = super

  return request if request.headers.key?("authorization")

  signer = request.options.sigv4_signer

  return request unless signer

  signer.sign!(request)

  request
end