def upload_data=(data)
      @upload_data = case data
      when Hash
        self.multipart ? data : Util.build_query_string_from_hash(data, action == :post)
      else
        data
      end
    end
def upload_data=(data)
      @upload_data = case data
      when Hash
        self.multipart ? data : Util.build_query_string_from_hash(data, action == :post)
      else
        data
      end
    end
Sets the upload data (request body) for the request. If the
 given argument is a Hash, the contents of the hash will be handled
 as form fields and will be form-encoded. The somposition of the request
 body is then going to be handled by Curl.

 If the given `data` is any other object, it is going to be treated as a stringable
 request body (JSON or other verbatim type) and will have it's `to_s` method called
 before sending out the request.

 @param data[Hash, #to_s] a Hash of form fields to values, or an object that responds to `to_s`