Questions tagged [httpsurlconnection]
329 questions
31
votes
4 answers
Java HttpsURLConnection and TLS 1.2
I read in an article that HttpsURLConnection will transparently negotiate the SSL connection.
The official document says:
This class uses HostnameVerifier and SSLSocketFactory. There are default implementations defined for both classes. [1]
Does…

Marc Wittmann
- 2,286
- 2
- 28
- 41
23
votes
1 answer
Reusing TCP connections with HttpsUrlConnection
Executive summary: I'm using the HttpsUrlConnection class in an Android app to send a number of requests, in a serial manner, over TLS. All of the requests are of the same type and are sent to the same host. At first I would get a new TCP connection…

Michael
- 57,169
- 9
- 80
- 125
20
votes
3 answers
Fiddler - Decrypt Android HttpsUrlConnection SSL traffic
I've spent countless hours trying to decrypt Android SSL traffic via Fiddler for HttpsUrlConnection with very little success. How do I reliably configure Fiddler to decrypt SSL traffic from an Android app using HttpsUrlConnection?
Here are my…

Steven
- 1,670
- 4
- 17
- 26
19
votes
8 answers
How to disable SSLv3 in android for HttpsUrlConnection?
We wrote client application in android which connects with https servers using HttpsUrlConnection apis. Due to Poodle vulnerability, we need to disable SSLv3 from the list of enabled protocols while invoking any request.
We followed the guidelines…

user1375399
- 223
- 1
- 2
- 7
18
votes
3 answers
How to do an HTTPS POST from Android?
I want to do a HTTPS post method to send some data from my android app to my website.
I used HttpURLConnection first and it's working fine with my HTTP URL. My production website is on HTTPS and I want to send the same POST using…

DJM
- 594
- 1
- 5
- 18
16
votes
9 answers
Webview not able to load https url in android?
I am implementing webview application in android. When i am trying to load https url one or two times it finishes the activity. Agian trying to load https url it shows webpage not available. please find below image what i got.
When i click on that…

Hareesh
- 933
- 3
- 11
- 22
16
votes
3 answers
How to use HttpsURLConnection through proxy by setProperty?
Network environment:
Https Client<=============>Proxy Server<==============>Https Server
192.168.17.11<-----extranet------>192.168.17.22
10.100.21.10<----intranet----->10.100.21.11
ps: Http…

CJeremy
- 209
- 1
- 3
- 7
14
votes
5 answers
weblogic.net.http.SOAPHttpsURLConnection cannot be cast to javax.net.ssl.HttpsURLConnection
I am getting "java.lang.ClassCastException" while trying to connect to a url using javax.net.ssl.HttpsURLConnection .
I am using Weblogic Server 10.3.4.
import javax.net.ssl.HostnameVerifier;
import javax.net.ssl.HttpsURLConnection;
import…

DKingKumar
- 549
- 1
- 6
- 18
14
votes
3 answers
How to override the cipherlist sent to the server by Android when using HttpsURLConnection?
During TLS negotiation, clients send a list of supported ciphers to the server, the server picks one, and encryption starts. I want to change this cipherlist sent to the server by Android, when I'm using HttpsURLConnection for communication.
I know…

AndroidSec
- 299
- 1
- 5
- 13
12
votes
2 answers
Android HttpsUrlConnection javax.net.ssl.SSLException Connection closed by peer handshake error when using local truststore
I'm having trouble with getting Android to connect to a simple OpenSSL server using the HttpsUrlConnection object (I've combed through StackOverflow and a bunch of online tutorials, and followed the examples pretty much line for line and I still…

aspergillusOryzae
- 746
- 2
- 9
- 25
11
votes
2 answers
HttpsURLconnection to post and get in Android
I am developing an simple application which uses https protocol to post and get data from the server. I searched on internet but there are few resources available, I tried most of them but couldn't do it successfully.
I tried with HttpClient it was…

Sathya Baman
- 3,424
- 7
- 44
- 77
9
votes
4 answers
Use java http connection instance after exception
Is the following code safe:
try {
URL url = new URL(urlRequest);
conn = (HttpURLConnection)url.openConnection();
conn.setConnectTimeout(30000);
conn.setReadTimeout(30000);
conn.setRequestProperty("Accept-Encoding", "gzip,…

Shcheklein
- 5,979
- 7
- 44
- 53
9
votes
3 answers
Getting a reference to Java's default http(s) URLStreamHandler
I have a library that I need to use in one of my projects, which unfortunately registers its own URLStreamHandler to handle http-URLs. Is there a way to get a reference to Java's default http- and https-URLStreamHandlers, so I can specify one of…

Markus A.
- 12,349
- 8
- 52
- 116
8
votes
0 answers
SSL Client Authentication with Certificate in Android
I'm writing an Android App which connects to a Server to call some Webservices. This server uses a self-signed Certificate for SSL and requires a Client Certificate for Authentication.
When I connect to the server with Android Chrome browser or with…

Gannic
- 263
- 1
- 3
- 10
8
votes
1 answer
HttpsURLConnection and Cookies
Basically i just want to get cookies from server. Here's simple code, but i guess it's not enough to get every cookie like e.g sessionID etc.
import java.net.*;
import java.util.*;
public class Cookie {
public static void main(String[]…

daredesm
- 597
- 2
- 7
- 22