Mercurial > hg > LGServices
diff src/main/java/de/mpiwg/gazetteer/utils/HTTPUtils.java @ 4:c30ff4f27ec3
adding developer guide documentation
author | "jurzua <jurzua@mpiwg-berlin.mpg.de>" |
---|---|
date | Mon, 18 May 2015 15:55:01 +0200 |
parents | 3e62083dbcbf |
children | 3b3e2963c8f7 |
line wrap: on
line diff
--- a/src/main/java/de/mpiwg/gazetteer/utils/HTTPUtils.java Tue May 12 14:54:13 2015 +0200 +++ b/src/main/java/de/mpiwg/gazetteer/utils/HTTPUtils.java Mon May 18 15:55:01 2015 +0200 @@ -98,10 +98,10 @@ return sb.toString(); } - public static HttpStringResponse getStringResponse(String link) throws IOException, KeyManagementException, NoSuchAlgorithmException{ - if(link.startsWith("https") || link.startsWith("HTTPS")) - return getHttpSSLStringResponse(link); - return getHttpStringResponse(link); + public static HttpStringResponse getStringResponse(String url) throws IOException, KeyManagementException, NoSuchAlgorithmException{ + if(url.startsWith("https") || url.startsWith("HTTPS")) + return getHttpSSLStringResponse(url); + return getHttpStringResponse(url); } private static HttpStringResponse getHttpSSLStringResponse(String link) throws IOException, KeyManagementException, NoSuchAlgorithmException{ @@ -140,7 +140,7 @@ private static HttpStringResponse getHttpStringResponse(String link) throws IOException{ - //System.out.println(link); + //System.out.println(url); URL url = new URL(link); HttpURLConnection httpConn = (HttpURLConnection)url.openConnection();