lib/flexirest/request.rb in flexirest-1.10.10 vs lib/flexirest/request.rb in flexirest-1.10.11

- old
+ new

@@ -402,11 +402,11 @@ if merged_params[key.to_sym].blank? && ![true, false].include?(merged_params[key.to_sym]) missing << key end end if missing.any? - raise Flexirest::MissingParametersException.new("The following parameters weren't specifed: #{missing.join(", ")}") + raise Flexirest::MissingParametersException.new("The following parameters weren't specified: #{missing.join(", ")}") end end end def prepare_url @@ -432,11 +432,11 @@ @url.gsub!(":#{token}", URI.encode_www_form_component(target.to_s)) end end if missing.present? - raise Flexirest::MissingParametersException.new("The following parameters weren't specifed: #{missing.join(", ")}") + raise Flexirest::MissingParametersException.new("The following parameters weren't specified: #{missing.join(", ")}") end end def append_get_parameters if @get_params.any? @@ -932,18 +932,18 @@ @headers = options[:headers] end end class HTTPException < RequestException - attr_accessor :status, :result, :request_url, :body, :raw_response + attr_accessor :status, :result, :request_url, :body def initialize(options) @status = options[:status] @result = options[:result] @request_url = options[:url] @body = options[:raw_response] @method = options[:method] end - alias_method :body, :raw_response + alias_method :raw_response, :body def message method = @method.try(:upcase) "The #{method} to '#{@request_url}' returned a #{@status} status, which raised a #{self.class.to_s} with a body of: #{@body}" end