./lib/animoto/http_engines/curl_adapter.rb in animoto-0.1.1.beta1 vs ./lib/animoto/http_engines/curl_adapter.rb in animoto-1.0.0
- old
+ new
@@ -17,11 +17,11 @@
# Creates a Curl::Easy object with the headers, options, body, etc. set.
#
# @param [Symbol] method the HTTP method
# @param [String] url the URL to request
# @param [String,nil] body the request body
- # @param [Hash<String,String>] headers hash of HTTP request headers
+ # @param [Hash{String=>String}] headers hash of HTTP request headers
# @return [Curl::Easy] the Easy instance
def build_curl method, url, body, headers, options
::Curl::Easy.new(url) do |c|
c.username = options[:username]
c.password = options[:password]
@@ -34,18 +34,17 @@
# Performs the request.
#
# @param [Curl::Easy] curl the Easy object with the request parameters
# @param [Symbol] method the HTTP method to use
# @param [String] body the HTTP request body
+ # @return [void]
def perform curl, method, body
case method
when :get
curl.http_get
when :post
curl.http_post(body)
end
end
- end
-
- adapter_map.merge! :curl => CurlAdapter
+ end
end
end
\ No newline at end of file