lib/rest_connection.rb in rest_connection-0.1.3 vs lib/rest_connection.rb in rest_connection-0.1.4

- old
+ new

@@ -203,10 +203,10 @@ # # decoding and post processing goes here. This is where you may need some customization if you want to handle the response differently (or not at all!). Luckily it's easy to modify based on this handler. def handle_response(res) if res.code.to_i == 201 or res.code.to_i == 202 return res['Location'] - elsif [200,203,204,302].detect { |d| d == res.code.to_i } + elsif [200,203,204].detect { |d| d == res.code.to_i } if res.body begin return JSON.load(res.body) rescue => e return res