System.out.println(((HttpURLConnection)conn).getResponseCode()); System.out.println(conn.getContentType()); System.out.println(conn.getHeaderField("Cache-Control")); try (var is = conn.getInputStream(); var isr = new InputStreamReader(is, "utf-8"); var bur = new BufferedReader(isr)) { bur.lines() .limit(10) .forEach(System.out::println); }
System.out.println(((HttpURLConnection)conn).getResponseCode()); System.out.println(conn.getContentType()); System.out.println(conn.getHeaderField("Cache-Control")); try (var is = conn.getInputStream(); var isr = new InputStreamReader(is, "utf-8"); var bur = new BufferedReader(isr)) { bur.lines() .limit(10) .forEach(System.out::println); }
System.out.println(((HttpURLConnection)conn).getResponseCode()); System.out.println(conn.getContentType()); System.out.println(conn.getHeaderField("Cache-Control")); try (var is = conn.getInputStream(); var isr = new InputStreamReader(is, "utf-8"); var bur = new BufferedReader(isr)) { bur.lines() .limit(10) .forEach(System.out::println); }
System.out.println(((HttpURLConnection)conn).getResponseCode()); System.out.println(conn.getContentType()); System.out.println(conn.getHeaderField("Cache-Control")); try (var is = conn.getInputStream(); var isr = new InputStreamReader(is, "utf-8"); var bur = new BufferedReader(isr)) { bur.lines() .limit(10) .forEach(System.out::println); }
System.out.println(((HttpURLConnection)conn).getResponseCode()); System.out.println(conn.getContentType()); System.out.println(conn.getHeaderField("Cache-Control")); try (var is = conn.getInputStream(); var isr = new InputStreamReader(is, "utf-8"); var bur = new BufferedReader(isr)) { bur.lines() .limit(10) .forEach(System.out::println); }