I can’t trace the request using Fiddler (a regular console application), tell me what the problem is, thanks.

URL myUrl = new URL("http://pro-java.ru"); HttpURLConnection myUrlCon = (HttpURLConnection) myUrl.openConnection(); // Вывести метод запроса System.out.println("Метод запроса: " + myUrlCon.getRequestMethod()); // Вывести код ответа System.out.println("Ответное сообщение: " + myUrlCon.getResponseMessage()); // Получить список полей и множество ключей из заголовка Map<String, List<String>> myMap = myUrlCon.getHeaderFields(); Set<String> myField = myMap.keySet(); System.out.println("\nДалее следует заголовок:"); // Вывести все ключи и значения из заголовка for(String k : myField) { System.out.println("Ключ: " + k + " Значение: " + myMap.get(k)); } 
  • Register proxy explicitly. Probably java does not use the system default settings. - Qwertiy
  • 'System.setProperty ("http.proxyHost", "127.0.0.1"); System.setProperty ("https.proxyHost", "127.0.0.1"); System.setProperty ("http.proxyPort", "8888"); System.setProperty ("https.proxyPort", "8888"); ' So? found in one topic, but the effect did not give it - SWR
  • in general, if http is in the address, then it seems to work, though on any page it gives an error of 400 or 404, if https is worth it, it does not track at all, incorrectly means the proxy is registered, what is the problem? - SWR
  • For https, you must enable https decryption in the fiddler settings and confirm the installation of its certificate in the system. - Qwertiy

0