0

My question is actually a follow up to Android upload video to remote server using HTTP multipart form data

I need to know which dependencies to add to gradle for the code to work. I tried as below but it does not work

//apache http client
compile 'org.apache.httpcomponents:httpmime:4.5.1'
compile 'org.apache.httpcomponents:httpclient:4.5.1'
Community
  • 1
  • 1
Katedral Pillon
  • 14,534
  • 25
  • 99
  • 199

1 Answers1

0

As I have answered at the following question:

Android project uses HttpClient 4.5

You can use HttpClient for Android 4.3.5 instead.

However, because of the deprecation of Apache's librabry from API22, suggest that you use HttpUrlConnection, OkHttp... instead.

You should read more Apache HTTP Client Removal

Community
  • 1
  • 1
BNK
  • 23,994
  • 8
  • 77
  • 87
  • 1
    Thanks for the response. I still haven't been able to confirm your answer as I am still looking to see how I might use HttpUrlConnection to upload video using multipart. See http://stackoverflow.com/questions/11164398/android-upload-video-to-remote-server-using-http-multipart-form-data?lq=1 but without using Apache. As soon as I get the code to work, I will confirm. – Katedral Pillon Oct 07 '15 at 22:19
  • Another options are OkHttp, Retrofit, I think in SO many sample codes available – BNK Oct 07 '15 at 23:43
  • You should also read [here](http://mysecondmemory.weebly.com/android/multipartform-data-requests-in-android-httpurlconnection-vs-okhttp). Hope this helps! – BNK Oct 07 '15 at 23:51