In order to send a string data to the server once, I do as below: Make “HttpURLConnection” to my URL address and open it Set the required heade ...
In order to send a string data to the server once, I do as below: Make “HttpURLConnection” to my URL address and open it Set the required heade ...
I have been using URLConnection.guessContentTypeFromName(String fname) to detect what mime type I need to use in my headers to return different docume ...
What will be the output of the following Java program? Note: Host URL is having length of content 127. a) 127 b) 126 c) Runtime Error d) Compil ...
I am trying to develop an instagram scraper; this is my code: I am therefore trying to set a session cookie to simulate a login and be able to view ...
I am downloading html source code of this webpage https://tv.zam.it/ch-Rai-1 using this: on 2019 samsung phone with android 9 works fine on fi ...
I am trying to mock a method which is opening a connection using URLConnection class and then getting stream input. I want to mock the URLConnection c ...
I'm currently retrieving HTML from a forums page using this code This code had been working for me for years. However, now when it retrieves the HT ...
I´m trying to get a header field with the following code: But I´m getting the following error: Main.java:14: error: cannot find symbol con.setRequ ...
I have a server at remote location and I can access logs that are placed on my server using a URL and authentication. The log file that I am trying to ...
I have a Java application that is runs constantly. This application makes HTTP requests to a cloud server. The problem is that at each request the mem ...
so I've tried to implement https://stackoverflow.com/a/1718140/13592426 this function for downloading file in my app, but I didn't succeed, and want t ...
Note: this question is closely related to Is it acceptable for a server to send a HTTP response before the entire request has been received? with the ...
So I have a problem with a Java program I have. The program's basic functionality includes basically connecting to a web API for data. The function th ...
I have a simple code that reads a line from a URL text file: But the URL server is a bit slow and takes a few seconds to respond. Whcih I think is ...
I'm trying to scrape live data from 50+ dynamic webpages and need the data to be updated every 1-2 seconds. To do so, I have a Timer scheduled every 1 ...
Make a request from request stream I've an OutputStream contains the below Request. It's dynamic and everything(Method, Type, Data[Multipart/Non-Mult ...
I used BufferedReader to proccess the output of a webpage. When the output of webpage is empty (I used Response.Clear in web side), the last line Log. ...
I have a system consists of workers that crawl web pages. Now, I set two parameters of URLConnection: connectTimeout and readTimeout. As inferred, th ...
In a java program (Eclipse ISE on a PC) I want to read a huge amount of data (around 1640188 bytes) from a web site. With Wireshark I can see that the ...
I wrote a program that Download the photo from the url... But I have a problem... Some photos are downloaded. And there is no problem. But some of th ...