Merge pull request #99 from jamy015/user-agent

Add version number to user agent
This commit is contained in:
Trent Hensler 2016-11-03 08:37:58 -07:00 committed by GitHub
commit 9940c493f6

View file

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