329 questions
0
votes
1
answer
127
views
cannot read this web page using httpsurlconnection or selenium
I am trying to read this https page using java
https://www.hkex.com.hk/eng/stat/smstat/dayquot/d250602e.htm
but always hit Read timed out.
Here is my code
try {
URL url = new URL("https://...
0
votes
0
answers
75
views
Java HttpsUrlConnection’s setFixedLengthStreamingMode doesn’t resume file upload
I am trying to upload a large file (say 100 MB) to aws s3 using HttpsUrlConnection. My application runs in unpredictable and unstable network, hence I expect connectivity drops during the upload.
...
0
votes
1
answer
122
views
How to fetch response from the Amazon Fsx DescribeFileCaches API?
I am trying to fetch the response for DescribeFileCaches API using HttpsURLConnection in Java. When using the AWS SDK, I am able to get the response but when hitting the API using the same headers in ...
-1
votes
1
answer
423
views
Java (HttpsURLConnection) url.openConnection() return 403 for some valid URL
I need to read HTML as test or stream from first web site page like pubs.acs.org, I have the code below that works for many URLs but for some of them it returns 403 error, I test this URLs in browser ...
-1
votes
1
answer
1k
views
URL to URI class cast exception
I had this code:
URL url = new URL(urlStr)
HttpsURLConnection con = (HttpsURLConnection) url.openConnection();
And is working correct until I updated to the latest spring/libraries versions. After ...
0
votes
1
answer
213
views
FileNotFoundException: https://www.googleapis.com/geolocation/v1/geolocate?key=
I am getting FileNotFoundException in Geolocation API. I have googled it and find that it support only POST method but I am already calling in POST itself.
Please find my code snip here below,
...
0
votes
1
answer
612
views
Android HttpsURLConnection is very slow to return 502 Bad Gateway
Update: They've changed the site. Instead of giving a generic 502 error from nginx it now gives an instant 403 with a custom message. This makes it impossible to reproduce the issue.
I have an app ...
1
vote
0
answers
1k
views
Isn't that supposed to pick tls 1.3 by default in Android?
According to https://developer.android.com/about/versions/10/behavior-changes-all, it says "In Android 10 and higher, TLS 1.3 is enabled by default for all TLS connections."
javax.net.ssl....
1
vote
0
answers
148
views
How to do DNS outside of VPN in Android VPN app
My Android app uses the VpnService API. The app makes some connections, starts a VpnService and shuttles data to-and-fro. Fairly normal.
While the VpnService is active, under particular circumstances ...
0
votes
1
answer
728
views
UnknownHostException on HttpsURLConnection with SSLSocketFactory
I'm trying to consume an API, but I need to upload a certificate to consume it.
This is what I've been trying to consume the API. In this method I open the connection for the consumption of the API:
...
0
votes
0
answers
49
views
Reusing connections for Improving performance [duplicate]
I am using HttpURLConnection to make GET requests. Below is the code:
class ConnectClass {
private HttpURLConnection connection;
public makerequest(URL url) throws Exception {
...
1
vote
1
answer
2k
views
How to download the pictures produced by OpenAI through the returned URL?
I have tried a lot of methods, but any OpenAI produced picture URL will time out?
Even if using HttpsURLConnection, setting connection timeout and read timeout doesn't work?
METHOD1:
FileUtils....
0
votes
1
answer
219
views
How to read url with ~300 MB of json text
I'm trying to read the text from https://mtgjson.com/api/v5/AllPrintings.json. I have tried with this code:
url = new URL("https://mtgjson.com/api/v5/AllPrintings.json");
conn = (...
0
votes
0
answers
157
views
HttpsURLConnection POST method: java.net.ConnectException: Connection timed out: connect
I have been trying to use an API with HttpsURLConnection POST method which sends an SMS. The class works fine when I call the function from the main function of the same class. However when I call the ...
0
votes
1
answer
53
views
Unable to connect with HttpsUrlConnection but able to connect using HttpClient
I am trying to convert from HttpClient to HttpsUrlConnection but when I try to connect using HttpsUrlConnection I get a 403 response code. The HttpClient code works perfectly. I do not know what to ...