mirror of
https://github.com/UnlegitDqrk/Potato.git
synced 2025-10-01 22:30:14 +02:00
Add version number to user agent
This commit is contained in:
@@ -80,7 +80,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.addRequestProperty("User-Agent", "Potato/1.7.5");
|
||||||
connection.connect();
|
connection.connect();
|
||||||
int inOven = connection.getResponseCode();
|
int inOven = connection.getResponseCode();
|
||||||
return inOven == 200;
|
return inOven == 200;
|
||||||
|
Reference in New Issue
Block a user