Class: KintoBox::KintoRequest

Inherits:
Object
  • Object
show all
Defined in:
lib/kinto_box/kinto_request.rb

Instance Method Summary collapse

Constructor Details

#initialize(method = 'GET', path = nil, body = {}, headers = nil) ⇒ KintoRequest

Returns a new instance of KintoRequest.



4
5
6
7
8
9
# File 'lib/kinto_box/kinto_request.rb', line 4

def initialize(method = 'GET', path = nil , body = {}, headers = nil)
  @method = method
  @path = path
  @body = body
  @headers = headers
end

Instance Method Details

#hashed_objectObject



11
12
13
14
15
16
# File 'lib/kinto_box/kinto_request.rb', line 11

def hashed_object
  { 'method' => @method,
    'path' => @path,
    'body' => @body
  }
end