} else if (method.equals(HTTPConstants.GET)) {
httpRequest = new HttpGet(uri);
} else if (method.equals(HTTPConstants.PATCH)) {
httpRequest = new HttpPatch(uri);
} else if (HttpWebdav.isWebdavMethod(method)) {
httpRequest = new HttpWebdav(method, uri);
} else {
throw new IllegalArgumentException("Unexpected method: '"+method+"'");
}
setupRequest(url, httpRequest, res); // can throw IOException
} catch (Exception e) {