mirror of
https://github.com/UnlegitDqrk/Potato.git
synced 2025-10-02 06:30:15 +02:00
@@ -79,6 +79,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.connect();
|
||||
int inOven = connection.getResponseCode();
|
||||
return inOven == 200;
|
||||
|
Reference in New Issue
Block a user