lib/flexirest/request.rb in flexirest-1.4.3 vs lib/flexirest/request.rb in flexirest-1.4.4
- old
+ new
@@ -459,10 +459,10 @@
end
if (200..399).include?(status)
if @method[:options][:plain]
return @response = Flexirest::PlainResponse.from_response(response)
- elsif status == 204 && @response.body.blank?
+ elsif [202, 204].include?(status) && @response.body.blank?
return true
elsif is_json_response? || is_xml_response?
if @response.respond_to?(:proxied) && @response.proxied
Flexirest::Logger.debug " \033[1;4;32m#{Flexirest.name}\033[0m #{@instrumentation_name} - Response was proxied, unable to determine size"
else