Module: CurlCommandGenerator

Included in:
HttpClient
Defined in:
lib/curl_command_generator.rb

Instance Method Summary collapse

Instance Method Details

#curlize(url, options = {}) ⇒ Object



2
3
4
5
# File 'lib/curl_command_generator.rb', line 2

def curlize(url, options = {})
  options = {:method => :get, :body => nil, :headers => nil}.merge( options )
  "curl -i #{headers2args(options[:headers])} #{method2arg(options[:method])} #{body2arg(options[:body])} #{url}"
end