Questions tagged [httpsurlconnection]
329 questions
0
votes
1 answer
How can I make it work HttpsURLConnection and SAX parser to be stable?
So I have used good ol' HttpClient without a problem, everything worked fine, until Android 6 hits, then I have to also add a HttpsURLConnection, since our clients unfortunately are not that fortunate to have new devices with more recent Android, so…

Michal Žídek
- 464
- 2
- 17
0
votes
0 answers
How to get XML data from https url in Android
I want to get XML data from the web server https://ruralfire.qld.gov.au/bushfirealert/bushfireAlert.xml
However, I can't do it because my codes always have an error "javax.net.ssl.SSLHandshakeException: Connection closed by peer".
And my InputStream…

Brian Tran
- 1
- 1
0
votes
3 answers
AsyncTask LIFX Bulb response
I have got problem with read output form request.
public JSONArray listLights()
{
try
{
URL adres = new URL("https://api.lifx.com/v1/lights/all");
HttpURLConnection polaczenie = (HttpURLConnection)…

nextion24
- 51
- 5
0
votes
2 answers
API Management REST API is not working
I am trying to execute the API Management REST API to get the list of API's. https://.management.azure-api.net/apis?api-version=2014-02-14
While executing through browser I am getting the output properly, but when I am trying to execute…

Priyanka Dahat
- 81
- 9
0
votes
2 answers
How to unit test with actual HttpURLConnection in android?
I am writing unit tests/integration tests that invoke class library that uses HttpsURLConnection objects. Many times whilst invoking methods on the connection objects through the unit tests, like addRequestProperty, setDoOutput, setRequestMethod I…

resp78
- 1,414
- 16
- 37
0
votes
1 answer
javax.net.ssl.SSLSocketFactory - how to add a TrustStore
I am using a custom SSLSocketFactory class that removes SSLv3 from enabled protocols. I am not able to figure out how to attach a Truststore to the socket factory that is set to the HttpsURLConnection. All the examples that I have seen so far use…

Krishnan V S
- 1,124
- 1
- 13
- 31
0
votes
2 answers
Java HttpsURLConnection executed successfully without setSSLSocketFactory setting
I am testing javax.net.ssl.HttpsURLConnection. Because the program is making HTTPS request so I thought I have to do setSSLSocketFactory in order to make request work.
BUT the program run fine without setSSLSocketFactory setting:
Here is my…

LHA
- 9,398
- 8
- 46
- 85
0
votes
1 answer
Java package porting
I am new to Java and I need to use HttpsUrlConnection from javax.net.ssl on some embedded platform (jme, clds 1.0).
Is it possible that I get a jar (from the Internet) that has this class with all the dependencies?
Update:
I am using JDK 1.1.8

uduck
- 149
- 1
- 1
- 8
0
votes
1 answer
HTTPS with client authentication not working on Android
I'm currently writing an Android App (Min SDK 16) that queries a HTTPS server for data. The server (Apache 2.4 on Debian 8) uses a certificate signed by our own CA and requires clients to also have a certificate signed by it. This works perfectly…

St0rmi
- 91
- 5
0
votes
1 answer
Android Connection not changing headers/request method
Given the following code:
private HttpsURLConnection buildConnection(final String urlString) throws MalformedURLException,
IOException, ProtocolException {
final URL url = new URL(urlString);
final HttpsURLConnection…

Demortes
- 161
- 11
0
votes
0 answers
How to login in a HTTPS page from android
I want to login to a website (https://example/logPage.jsp) which requires user and password, then read the html content.
I have tried to send a POST request but I always recibe the html of the logPage.jsp.
This is what I have:
private String…

Andrés
- 1
- 1
0
votes
2 answers
Alternative for deprecated HttpClient, HttpPost, NameValuePair
I've been searching a lot, however haven't find any solution. I want to use URL, HttpsUrlConnection instead of deprecated ones (HttpClient, HttpPost, DefaultHttpClient). I have this code below so far:
Note "MyUrl" takes some parameters. See…

Alvin
- 894
- 8
- 16
0
votes
1 answer
Use TLS and disable SSL in Android
I want to create a secure connection between an android client and a delphi server. It is recommended to use TLS1.1 or TLS1.2 and an self signed certificate.
For now the minimum sdk version is 19.
I figured out how to connect with a self signed…

Bolic
- 705
- 2
- 12
- 30
0
votes
1 answer
FileNotFoundException with Urlconnection Get Request
Doing GET request with URLConnection. code is here
java.net.URL url = new java.net.URL(requestUrl);
URLConnection urlConnection = url.openConnection();
is = new BufferedInputStream(urlConnection.getInputStream());
getting…

JosephM
- 2,935
- 4
- 18
- 28
0
votes
1 answer
Java Post Data HttpsUrlConnection or HttpClient 4.5
I am trying to do what I thought was a simple task. I need to POST data to a PHP server. I have tried this solution but in Apache HttpClient 4.5 I can't find BasicNameValuePair in the package. Upon further research I thought I'd try…

Andrew
- 175
- 1
- 2
- 12