def url(path, params = {})
      params = params.inject({}, &@@stringify)
      path = path.gsub(@@placeholder) { params.delete($1, &@@required) }
      params = params.inject('', &@@parameterize)
      [path, params].reject(&:nil?).reject(&:empty?).join('?')
    end
def url(path, params = {})
      params = params.inject({}, &@@stringify)
      path = path.gsub(@@placeholder) { params.delete($1, &@@required) }
      params = params.inject('', &@@parameterize)
      [path, params].reject(&:nil?).reject(&:empty?).join('?')
    end
Converts a path and params to a Salesforce-suitable URL.