Class: Idnow::PostJsonRequest
- Inherits:
-
Net::HTTP::Post
- Object
- Net::HTTP::Post
- Idnow::PostJsonRequest
- Defined in:
- lib/idnow/post_json_request.rb
Instance Method Summary collapse
-
#initialize(path, data) ⇒ PostJsonRequest
constructor
A new instance of PostJsonRequest.
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 |