Send HTTP request and fetch data in Java

import; import; import; public class Main { public static void main(String[] args) { try { URL my_url = new URL(""); BufferedReader br = new BufferedReader(new InputStreamReader(my_url.openStream())); String strTemp = ""; while(null != (strTemp = br.readLine())){ System.out.println(strTemp); } } catch (Exception ex) { ex.printStackTrace(); } } }
Send HTTP request and fetch data using Java

#http #request #data #cesarnog #java

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.