lib/async/rest/wrapper/url_encoded.rb in async-rest-0.10.1 vs lib/async/rest/wrapper/url_encoded.rb in async-rest-0.12.0

- old
+ new

@@ -57,25 +57,17 @@ def join ::Protocol::HTTP::URL.decode(super, symbolize_keys: true) end end - def wrap_response(response) - if body = response.body - response.body = Parser.new(body) - end - end - - def process_response(request, response) + def parser_for(response) if content_type = response.headers['content-type'] if content_type.start_with? @content_type - wrap_response(response) - else - raise Error, "Unknown content type: #{content_type}!" + return Parser end end - return response + return super end end end end end