Class: Idnow::PostJsonRequest

Inherits:
Net::HTTP::Post
  • Object
show all
Defined in:
lib/idnow/post_json_request.rb

Instance Method Summary collapse

Constructor Details

#initialize(path, data) ⇒ PostJsonRequest

Returns a new instance of PostJsonRequest.



6
7
8
9
10
# File 'lib/idnow/post_json_request.rb', line 6

def initialize(path, data)
  super(path)
  self['Content-Type'] = 'application/json'
  self.body = data.to_json
end