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



179
180
181
# File 'lib/httpx/plugins/aws_sigv4.rb', line 179

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

#build_requestObject



183
184
185
186
187
188
189
190
191
192
193
194
195
# File 'lib/httpx/plugins/aws_sigv4.rb', line 183

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