Class: ApiPost

Inherits:
ApiMethod show all
Defined in:
lib/tester/definition/methods/api_post.rb

Instance Attribute Summary

Attributes inherited from ApiMethod

#expected_response, #request

Instance Method Summary collapse

Methods inherited from ApiMethod

#initialize

Constructor Details

This class inherits a constructor from ApiMethod

Instance Method Details

#call(url, body_params = {}, request_params = {}) ⇒ Object



11
12
13
# File 'lib/tester/definition/methods/api_post.rb', line 11

def call url, body_params={}, request_params={}
  post url, body_params.to_json, request_params
end

#post(url, json_payload, headers) ⇒ Object



5
6
7
8
9
# File 'lib/tester/definition/methods/api_post.rb', line 5

def post url, json_payload, headers
  RestClient.post(url, json_payload, headers)  { |real_response, request, result|
    real_response
  }
end

#verbObject



15
16
17
# File 'lib/tester/definition/methods/api_post.rb', line 15

def verb
  SupportedVerbs::POST
end