module RestClient

Public Class Methods

execute(args, &block) click to toggle source
# File lib/susu/http_lib/restclient.rb, line 6
def execute(args, &block)
  method = args[:method]
  url = args[:url]
  post_params = args[:payload]
  headers = args[:headers]
  bm = Benchmark.realtime do
    @response = orig_execute(args, &block)
  end

  Susu.log_all(
    method, url, @response.code, bm, post_params,
    @response.body, headers,
    @response['Content-Encoding'], @response['Content-Type']
  )
  @response
end
Also aliased as: orig_execute
orig_execute(args, &block)
Alias for: execute