

HttpPost request = new HttpPost(TapabookUrls.urlSubirTapa) StringBuilder builder = new StringBuilder() Import. Īnd here's the code HttpClient httpClient = new DefaultHttpClient() It needs the following imports: import .mime.HttpMultipartMode

Typical example of it would be editing your profile on a social network, you're sending both data and -usually- a file (your avatar).įollowing snippet should be within an AsyncTask or similar, it must not be within the UI thread, for latest Android versions will simply kill your app if you do http requests on the main UI thread. You want to use a http request to send data and files to a web server.
