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
1
vote
2 answers

Android okhttp library

To use OkHttp in a Gradle build, I need to add the following dependency to the Gradle build. compile 'com.squareup.okhttp:okhttp:2.5.0' Does that mean I am using okhttp-urlconnection module which implements the familiar java.net.HttpURLConnection…
lyc001
  • 777
  • 1
  • 10
  • 25
1
vote
3 answers

Adapting Retrofit 2.0 responses using GSON for successful and failed response

How can I adapt the Retrofit 2.0 to call the right model according to the server response. i.e Json return for Successfully { "status": "successful", "session_id": "123", } i.e Json return for Failed { "status": "fail", "message": "Wrong…
Thiago
  • 12,778
  • 14
  • 93
  • 110
1
vote
2 answers

Volley Request with Raw data

In my application I have to send POST request with JSON req param, I tried to create request with Postman Rest Client and it is working fine but not working with below code. In Postman req parameter sent as raw data, But I am not sure how to send it…
Krishnakant
  • 1,453
  • 3
  • 18
  • 30
1
vote
2 answers

Android - HttpURLConnection POST parameters not working

I am using HttpURLConnection for communicating with web service in one of my android App, GET method & parameters are submitted correctly but when I tried to POST request the POST parameters are not submitted in the request. I have attached the…
1
vote
2 answers

How to send JSON Format HTTP Request to Server?

I am trying to send a HTTP Server request (JSON Encoded String) to server, but don't understand how to make the server request. This is the format which gives me JSON response. { "api_id": "Ddbl77c22oCVrXQs2WiZ", "api_secret":…
user3153487
1
vote
1 answer

How to send phone Number in web service and receive request in android

I am facing trouble in send data to post method via http client.I want to send any phone number to web service and receive request. Here my SignUp.java:- public class SignUp extends AppCompatActivity implements View.OnClickListener { TextView…
Anand Jain
  • 2,365
  • 7
  • 40
  • 66
1
vote
1 answer

Does DefaultHttpClient still work running on Android 6?

Leaving target on API22 and running the app on Android 6 platform device, I see that DefaultHttpClient is still working, even though it isnt supported by the new platform. How is it possible, does it work in a compatibility mode?
1
vote
1 answer

HTTP call during phone shutdown

I am using SHUTDOWN intent filter to detect when phone is getting shutdown and registered a receiver with SHUTDOWN intent filter in manifest file. In onReceive method I am starting a http call on different thread , but http call is not happening…
Naga
  • 1,931
  • 4
  • 25
  • 42
1
vote
1 answer

Android is ignoring cookies in my HTTP POST

My app does HTTP POSTS, in general the app works, but I am having trouble with the cookies. My code seems to get the cookies fine, through the HttpClient variable and out, but the results of the POST reveal that my app (as a client), is not…
Josh
  • 6,251
  • 2
  • 46
  • 73
1
vote
1 answer

FileAsyncHttpResponseHandler cancel request

I want to cancel a FileAsyncHttpResponseHandler request in android app, but just one (not all of them). There are these methods available, but none of them cancel the request. It proceeds until the file is completely…
Damia Fuentes
  • 5,308
  • 6
  • 33
  • 65
1
vote
1 answer

How to cancel image and video upload like whatsapp

I am uploading an image and video on to a php server, using multipart. I want to be able to cancel the upload when user presses button like whatsapp. The progress is shown correctly but I just want to cancel upload on click but I don't know how.…
1
vote
1 answer

HttpURLConnection: No data in the POST request

I have created a Django Rest server. And I am trying to POST a JSON content in java using HttpURLConnection. However, when I am registering OutputStream in java, the server get a POST request with no JSON content. Hence the server rejecting the…
1
vote
0 answers

Using Apache HttpClient 4.3 with Android and other platforms

I'm currently porting a backup client called Degoo from Windows to Android. The client is written in Java 7 and we're targeting Android 4.4 and above so I figured that most code, except the UI would be pretty straightforward to port. Unfortunately I…
Yrlec
  • 3,401
  • 6
  • 39
  • 75
1
vote
0 answers

Warning:Dependency org.apache.httpcomponents:httpclient is ignored as it may be conflicting with the internal version provided by Android

I added http mime library in gradle dependencies as: compile 'org.apache.httpcomponents:httpmime:4.4.1' But after compiling Android Studio is showing following warnings: Warning:Dependency org.apache.httpcomponents:httpclient is ignored as it may…
Krupal Shah
  • 8,949
  • 11
  • 57
  • 93
1
vote
0 answers

DefaultHttpClient deprecated in API 22. How does it making right new network based application in Android?

During the development of a new Android application, I needed to look for documentation for classes HttpClient package org.apache.http. I noticed amazed that the whole package has been deprecated in the API 22, and as a suggestion for this page…
and.ryx
  • 743
  • 1
  • 7
  • 16