Whenever I try to perform a GET request on a certain website (seen below) I always get a SocketTimeoutException. I only get this problem in Java, whereas if I try using Python's requests library I successfully manage to get the text.
String link = "https://www.yeezysupply.com/api/products/FV6125/availability";
try {
Connection connection = Jsoup.connect(link);
connection.header("content-type", "application/json; charset=utf-8");
Document document = connection.get();
System.out.println(document.text());
} catch (IOException e) {
e.printStackTrace();
}
Here is a screenshot of the error: https://prnt.sc/rp1ym9
Line 64 from my Main class is Document document = connection.get();
Also, when I use the Chrome extension 'PlugMan' I am able to successfully obtain the body from the site using a GET request, so clearly there is an issue with how I'm doing it in Java, because it works elsewhere.
Thank you.