Class: Net::HTTP::Signature::Request

Inherits:
Object
  • Object
show all
Defined in:
lib/net/http/signature/request.rb

Instance Method Summary collapse

Constructor Details

#initialize(verb:, uri:, headers:, body:) ⇒ Request

Returns a new instance of Request.


5
6
7
8
9
10
11
12
# File 'lib/net/http/signature/request.rb', line 5

def initialize(verb:, uri:, headers:, body:)
  @verb = verb
  @uri = uri
  @headers = headers
  @body = body

  fail ArgumentError, "Date header required" unless @headers.key?("Date")
end

Instance Method Details

#to_sObject


14
15
16
# File 'lib/net/http/signature/request.rb', line 14

def to_s
  "#{verb} #{uri} #{headers} #{body}"
end