*/
private HttpURLConnection getConnection(String method, Map<String, String> params, Path path) throws IOException {
params.put("doas", doAs);
Class<? extends Authenticator> klass =
getConf().getClass("hoop.authenticator.class", HoopKerberosAuthenticator.class, Authenticator.class);
Authenticator authenticator = ReflectionUtils.newInstance(klass, getConf());
try {
StringBuilder sb = new StringBuilder();
String separator = "?";
for (Map.Entry<String, String> entry : params.entrySet()) {
sb.append(separator).append(entry.getKey()).append("=").append(URLEncoder.encode(entry.getValue(),