/** * Creates a new XMLCall for the given url. * * @param url the target URL to call * @param contentType the Content-Type to use * @return a new instance to perform the xml call * @throws IOException in case of an IO error */ public static XMLCall to(URL url, String contentType) throws IOException { XMLCall result = new XMLCall(); result.outcall = new Outcall(url); result.outcall.setRequestProperty("Content-Type", contentType); return result; }