def normalize(path, extra=nil, params={})
      if extra.is_a?(Hash) and params.empty?
        params = extra
        extra = nil
      end

      path = "#{path}/#{extra}" if extra
      path = "/#{path}" unless path[0] == '/'

      query = default_query.merge params

      params[:query] = query unless query.empty?
      params = default_params.merge params

      [path, extra, params]
    end
def normalize(path, extra=nil, params={})
      if extra.is_a?(Hash) and params.empty?
        params = extra
        extra = nil
      end

      path = "#{path}/#{extra}" if extra
      path = "/#{path}" unless path[0] == '/'

      query = default_query.merge params

      params[:query] = query unless query.empty?
      params = default_params.merge params

      [path, extra, params]
    end
Normalize the three input parameters