# File lib/typhoeus/easy.rb, line 239 def method=(method) @method = method if method == :get set_option(OPTION_VALUES[:CURLOPT_HTTPGET], 1) elsif method == :post set_option(OPTION_VALUES[:CURLOPT_HTTPPOST], 1) self.post_data = "" elsif method == :put set_option(OPTION_VALUES[:CURLOPT_UPLOAD], 1) self.request_body = @request_body.to_s elsif method == :head set_option(OPTION_VALUES[:CURLOPT_NOBODY], 1) else set_option(OPTION_VALUES[:CURLOPT_CUSTOMREQUEST], method.to_s.upcase) end end