Sha256: e8d770babfa41b73166ed33f9a143bb44bbd700e323dd5a634afdc868ddb51dc

Contents?: true

Size: 629 Bytes

Versions: 1

Compression:

Stored size: 629 Bytes

Contents

require 'tester/definition/request'
require 'tester/definition/response'
require "tester/version"
require 'rest-client'
require 'json'
require 'tester/definition/methods/api_method'
require 'tester/reporter/api_report'
require 'tester/reporter/status_code_report'

class ApiPost < ApiMethod
  attr_accessor :syntax_error_response

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

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

  def verb
    SupportedVerbs::POST
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
api-tester-0.0.1 lib/tester/definition/methods/api_post.rb