Viewing http response (HTML) fetched with URLConnect
Hi, I have piece of Java code that fetches the HTML from a website. Specifically strava.com/login (but that's not really important).
URLConnection connection = new URL("https://www.strava.com/login").openConnection();
InputStream response = connection.getInputStream();
I get a ton of text-only HTML, is it possible to somehow view this in a browser?
Re: Viewing http response (HTML) fetched with URLConnect
Save the output to a file with a .html extension. Then open the file with your favorite web browser. Most likely many elements will render ok.