1

I found many posts that used HttpClient and HttpPost in order to upload different types of data to a server, but now these method are deprecated.

Which is now the alternative to upload these types of data to a server?

Thanks in advance.

Mettiu92
  • 11
  • 3
  • Possible duplicate of [I need an alternative option to HttpClient in Android to send data to PHP as it is no longer supported](http://stackoverflow.com/questions/29058727/i-need-an-alternative-option-to-httpclient-in-android-to-send-data-to-php-as-it) – Philipp May 03 '17 at 08:06
  • try [Retrofit](http://square.github.io/retrofit/) – ben10 May 03 '17 at 10:14

2 Answers2

0

Use MultipartEntityBuilder to send files

http://www.tauntaunwonton.com/blog/2015/1/21/simple-posting-of-multipartform-data-from-android

Mohammad nabil
  • 1,010
  • 2
  • 12
  • 23
0

I have resolved with compile "cz.msebera.android:httpclient:4.4.1.2"

Mettiu92
  • 11
  • 3