Questions tagged [androidhttpclient]

Implementation of the Apache DefaultHttpClient that is configured with reasonable default settings and registered schemes for Android This class was deprecated in API level 22 (Android 5.1). Please use URLConnection and friends instead. The Apache HTTP client is no longer maintained and may be removed in a future release. Please visit this webpage for further details.

Implementation of the Apache DefaultHttpClient that is configured with reasonable default settings and registered schemes for Android.

Warning: This class was deprecated in API level 22 (Android 5.1).
Please use URLConnection and friends instead. The Apache HTTP client is no longer maintained and may be removed in a future release. Please visit this webpage for further details.

Useful links

418 questions
10
votes
1 answer

Unable to resolve host: URL No address associated with hostname

I have an web service call to bring down a JSON object and it only works if I have the IP address and not the host name. I have been fine using IP addresses but now I need to have the host name. Here is my code StringBuilder stringBuilder = new…
BigT
  • 1,413
  • 5
  • 24
  • 52
9
votes
1 answer

okhttp new JsonObject from Response

I am trying to use OKHttp and https://github.com/hongyangAndroid/okhttp-utils to implement Login function, but I don't know how to create new a JsonObject use Response in the Callback. OkHttpUtils.post() .url(url) …
Shuai Wang
  • 335
  • 1
  • 8
  • 20
8
votes
2 answers

Get html of a website with retrofit - Android?

How can I get html of a website with retrofit ? for example I have this url and I need to get html of this url and how can I load more . Bellow is my code : MainActivity.java: public class MainActivity extends AppCompatActivity { TextView txt; …
user4813855
8
votes
1 answer

AndroidHttpClient Nullpointerexception calling android.net.http.AndroidHttpClient.isMmsRequest

A customer has reported a strange error. When doing a normal AndroidHttpClient.execute() in an AsyncTask, the app crashes and he gets the following stack trace java.lang.RuntimeException: An error occured while executing doInBackground() at…
KlasE
  • 142
  • 11
7
votes
3 answers

How to resolved http and Site Behavior: Navigation error in android app?

Recently I updated android 9 to android 10 but unfortunately, the app sometimes crashes and gives this error. com.fgapps.maker E/chromium: [ERROR:cookie_manager.cc(137)] Strict Secure Cookie policy does not allow setting a secure cookie for…
Attaullah
  • 3,856
  • 3
  • 48
  • 63
7
votes
4 answers

With what can I replace http deprecated methods?

I was following a tutorial and I got to a point where a lot of the code is deprecated. ArrayList dataToSend = new ArrayList<>(); dataToSend.add(new BasicNameValuePair("name", user.name)); dataToSend.add(new BasicNameValuePair("age",…
Bogdan Daniel
  • 2,689
  • 11
  • 43
  • 76
7
votes
3 answers

HttpURLConnection.getInputStream very slow

HttpURLConnection.getInputStream takes very much time when compared to iPhone App which uses the same server side services. The following code is used for the service : date= new java.util.Date(); Log.d("time","Time…
Timson
  • 1,337
  • 3
  • 19
  • 32
6
votes
1 answer

Certificate Pinning on Android with Robospice

I'm reading about certificate pinning on Android and I'm confused. I'm not using okhttp or retrofit so I have to do it manually. There is a tutorial here: https://www.owasp.org/index.php/Certificate_and_Public_Key_Pinning#Android where they are…
falsetto
  • 789
  • 2
  • 11
  • 35
6
votes
0 answers

Retrofit support SNI

I have question. Does retrofit support SSL with use SNI? It's a technique that allows servers to return different SSL certificates depending on the requested host name, which allows using SSL in shared hosting scenarios.
Michael
  • 780
  • 1
  • 10
  • 34
6
votes
1 answer

Create a Custom Completion/Callback Handler to return Objects after a HTTP Request is Completed

I am an iOS Developer starting to learn Android. In Swift, creating a completion handler is very simple, but I still can't find a way to do it in Java. I am sorry if this question is too noob for StackOverflow people. Problem I am creating a class…
JayVDiyk
  • 4,277
  • 22
  • 70
  • 135
6
votes
2 answers

Multipart/form-data construction with android

I am trying to make an HttpPost with multiPart/form-data via my android app. I have a postman test that is working with my api and the preview of that request in postman, looks like this: POST /api/0.1/content/upload HTTP/1.1 Host:…
erik
  • 4,946
  • 13
  • 70
  • 120
5
votes
1 answer

Android - Caused by: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found

I'm using self-signed CA certificate for testing environment but facing issue to hit api using HttpClient.... Please help me to fix this issue.... W/System.err: javax.net.ssl.SSLHandshakeException: java.security.cert.CertPathValidatorException:…
Kashif Jawed
  • 51
  • 1
  • 1
  • 4
5
votes
1 answer

Run php script through Android app

I have a php script stored in Xampp server, and want that my application execute it to perform a task. In eclipse nothing happend with android.txt at server side. The following is my code for android app String url =…
5
votes
1 answer

Compiling Google Download Library targing API 23 Android Marshmallow

I'm using Google's Download library for expansion pack downloading as distributed through the 'Android SDK' manager. Building using Eclipse/Ant since haven't migrated to AS/Gradle yet - but any solution would help. In API 23 Apache HTTP goes away.…
5
votes
1 answer

How to repackage HttpClient 4.3.1 and remove dependencies on commons-logging?

I want to repackage apache's httpclient lib to ship it with an android app (like https://code.google.com/p/httpclientandroidlib/ but with HttpClient 4.3.1) Therefore, I downloaded the httpclient 4.3.1 jar (includes all its dependencies) by hand and…
Stuck
  • 11,225
  • 11
  • 59
  • 104
1
2
3
27 28