I need to send the multi parameter in form data while uploading a file to server on Android. I used this code for uploading a files to server. Here my doubt is how to send multi parameters in form data?
1 Answer
You'll probably want to use the Apache HTTP client stuff. Put a List<NameValuePair> of your desired values into a UrlEncodedFormEntity, set it as the entity in an instance of HttpPost, and POST away.
1 Comment
Argyle
@bharath I thought you wanted to send form data. There's a
ByteArrayEntity and a FileEntity if that's what you want to send. And an InputStreamEntity if you don't necessarily want to load up everything in memory first.