+ 1

Can't see the real content in java input stream

I have a java program that can save the content of website.When save the content from the url "www.mysite.com/text.txt" I only got the html code instead of the text.txt file that I upload on my server.How can I fix it.When I try to access the url from browser it show the content of .txt file. That is the code that I used. URI uri=new URI("https://mysite.com/test.txt"); Inputstream is=uri.toUrl().openStream();

4th Dec 2021, 10:27 AM
Devil Sniper
Devil Sniper - avatar
2 Respostas
4th Dec 2021, 1:44 PM
zemiak
+ 1
https://code.sololearn.com/cA14a144a4A1/?ref=app
4th Dec 2021, 3:12 PM
A͢J
A͢J - avatar