hmkcode / Android

Android related examples
3.52k stars 3.41k forks source link

Now HttpClient is deprecated , so can re-submit with use of HttpUrlConnection #10

Closed chiragandroid closed 7 years ago

chiragandroid commented 8 years ago

I was always using these code for Sending data to web service through the app. but now after android M update, they closed HttpClient and use HttpUrlConnection.So how to send data to web service through HttpUrlConnection

martinGele commented 8 years ago

Hi there, you should use the Apachy legacy library, those libraries are being deprecated. android { compileSdkVersion 'android-MNC' buildToolsVersion "23.0.0 rc3" useLibrary 'org.apache.http.legacy'

implement this in the gradle file ( useLibrary 'org.apache.http.legacy')

WalterMorpheus commented 8 years ago

I will have an update soon

shktauf commented 7 years ago

hi, for using HTTP Client use

android { useLibrary 'org.apache.http.legacy' } in build.gradle and sync