Merge pull request #72 from jomo/master

needs more Potato, fixes #71
This commit is contained in:
Kyle Clemens 2015-12-02 19:41:39 -05:00
commit 7b12d42241

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;