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.



8
9
10
11
12
# File 'lib/idnow/post_json_request.rb', line 8

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