needs more Potato, fixes #71

This commit is contained in:
jomo 2015-11-23 04:29:33 +01:00
parent 1947ed3c4c
commit 560d9338b3

View file

@ -79,6 +79,7 @@ public class Potato implements Tuber {
final URL url = new URL("https://www.google.com/search?q=potato"); final URL url = new URL("https://www.google.com/search?q=potato");
HttpURLConnection connection = (HttpURLConnection) url.openConnection(); HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setRequestMethod("GET"); connection.setRequestMethod("GET");
connection.addRequestProperty("User-Agent", "Potato");
connection.connect(); connection.connect();
int inOven = connection.getResponseCode(); int inOven = connection.getResponseCode();
return inOven == 200; return inOven == 200;