private HttpURLConnection createConnection() { try { final HttpURLConnection connection; if (httpProxyHost != null) connection = CONNECTION_FACTORY.create(url, createProxy()); else connection = CONNECTION_FACTORY.create(url); connection.setRequestMethod(requestMethod); return connection; } catch (IOException e) { throw new HttpRequestException(e); } }
private HttpURLConnection createConnection() { try { final HttpURLConnection connection; if (httpProxyHost != null) connection = CONNECTION_FACTORY.create(url, createProxy()); else connection = CONNECTION_FACTORY.create(url); connection.setRequestMethod(requestMethod); return connection; } catch (IOException e) { throw new HttpRequestException(e); } }