# File lib/oauth/consumer.rb, line 155
    def token_request(http_method, path, token = nil, request_options = {}, *arguments)
      response = request(http_method, path, token, request_options, *arguments)

      case response.code.to_i

      when (200..299)
        CGI.parse(response.body).inject({}) { |h,(k,v)| h[k.to_sym] = v.first; h }
      when (300..399)
        # this is a redirect
        response.error!
      when (400..499)
        raise OAuth::Unauthorized, response
      else
        response.error!
      end
    end