# File lib/restclient/abstract_response.rb, line 46
    def return! &block
      if (200..206).include? code
        self
      elsif [301, 302].include? code
        unless [:get, :head].include? args[:method]
          raise Exceptions::EXCEPTIONS_MAP[code], self
        else
          follow_redirection &block
        end
      elsif code == 303
        args[:method] = :get
        args.delete :payload
        follow_redirection &block
      elsif Exceptions::EXCEPTIONS_MAP[code]
        raise Exceptions::EXCEPTIONS_MAP[code], self
      else
        raise RequestFailed, self
      end
    end