Questions tagged [multipartentity]

MultipartEntity is successor of HttpEntity, contained in HttpMime API since version 4.0. It's use is primary to simplify process of posting multipart content over HTTP. It allows to add multiple parts of different content-type and encoding.

MultipartEntity, part of HttpMime 4.0 and later. Allows you to put multiple parts, separated by boundary strings and encoded using given charset, into request.

It can have different modes, based on HttpMultipartMode constants. RFC Strict mode ( RFC 822, RFC 2045, RFC 2046 compliant ) and Browser compatible mode.

Each part of request is set via addPart(String name, ContentBody body) or addPart(FormBodyPart body) method.

Note that request, can have only one entity set, so all data must be fit in MultipartEntity object.

232 questions
1
vote
1 answer

how to send data to server through MultipartEntity

am developing an application that can send an image and a user's first name and second name to the server. The application can send the image to the server but I have failed to retrieve user's first name and second name. Below is my code…
George J
  • 195
  • 1
  • 4
  • 20
1
vote
0 answers

Upload a file through an HTTP form, via MultipartEntityBuilder - Error on create() call

I am trying to use the apache http libraries and MultipartEntityBuilder to code an upload AsyncTask, I am using a piece of code from this post. In the project Libraries I have…
ceyquem
  • 2,079
  • 1
  • 18
  • 39
1
vote
1 answer

MultipartEntity: Cannot set headers for StringBody

I want to do a file upload with multiparty entity. I want to upload an audio file and an XML file. I want to set some headers to the image and to the XML part too. this is how I do it: // adding the audio file File f = new…
czadam
  • 1,827
  • 1
  • 18
  • 31
1
vote
1 answer

I cant post data & image in localhost server using json

I working with this code and added my full code.I cant find what the error i did..I want to post my datas and image in server. public class MainActivity extends Activity { String name,…
karthik
  • 123
  • 13
1
vote
0 answers

Android: send file with InputStreamBody

I want to send file to server. While I'm using FileBody, everting works fine MultipartEntity entity = new MultipartEntity(); entity.addPart("file", new FileBody(file)); post.setEntity(entity); client.execute(post); But when I tried to use…
Jim
  • 8,874
  • 16
  • 68
  • 125
1
vote
3 answers

Getting 503 as Http response in android?

Please check my logcat.This is what I get when I parse the http response. 503 Service Unavailable
SREEJITH
  • 816
  • 1
  • 8
  • 19
1
vote
2 answers

Android/Java: Can't find MultipartEntity class despite adding it to build path

I'm writing an app that lets a user choose a photo already on their phone and uploads it to a server. Unfortunately when I click the button to send the photo to the sever, in logcat I see: Could not find class…
Shaquil Hansford
  • 383
  • 1
  • 2
  • 9
1
vote
1 answer

how to Upload files using MULTIPART file upload in DROPBOX

I am trying to upload files using MULTIPART entity method.But it fails in error says that {"error": "file parameter value 'None' is invalid"} My code is: File file = new File("C:/Users/sst-06/Desktop/new.txt"); …
Raja
  • 239
  • 1
  • 5
  • 18
1
vote
1 answer

android upload image using MultipartEntity

I'm trying to upload an image using the following code: HttpClient httpClient = new DefaultHttpClient(); HttpPost httpPost = new HttpPost( "http://konsole-data.de/uploadtest/upload.php"); …
Droidman
  • 11,485
  • 17
  • 93
  • 141
1
vote
1 answer

MultiPartEntity along with plain text in android

I am trying to send MultiPartEntity to the server to upload an image. I have to send data to the server with a MultiPartEntity, The following is a sample request. { "user": { "id": "12345", "primary_account_id": "43566" }, …
Taruni
  • 1,671
  • 4
  • 22
  • 43
1
vote
2 answers

POST-ing text and files with HTTPBuilder and MultipartEntity

I am using groovyx.net.http.HTTPBuilder to POST from Grails to a PHP script. I need to attach a couple of text fields and a number of files. I can attach a few textfields this way with great success: MultipartEntity mpc = new…
Joe Beuckman
  • 2,264
  • 2
  • 24
  • 63
1
vote
1 answer

Get xml response from httpmultipart request

I have a webservice that receibes a files with multipart (In c#), when i send a big file(15MB) by a chrome extension(Advanced Rest extension) the file uploads ok and i can see the body response:
rbrlnx
  • 286
  • 7
  • 23
1
vote
0 answers

Mime multipart NoSuchMethodError exception in android

I'm trying to use Mime to transfer files between 2 Android devices. I have a sendFile() method which (surprisingly) sends the requested file. Here's the code: public void sendFile(File f) throws IOException { BufferedOutputStream out = new…
Ido
  • 11
  • 1
0
votes
1 answer

How to handle n number of Multipart files in Spring-boot Rest Controller

I am creating an application wherein there is a form & sub-form. The form consists of Product Details. Sub-form consists of Color Details of the Product. The frontend API request body is shown below. { "raw_material_id": 1137, "extra_wip": "", …
0
votes
1 answer

How to send aes encrypted Multipart Entity file and parameters with Retrofit to the server?

How to send aes encrypted Multipart Entity file and parameters with Retrofit to the server in Android?
Hossein Kurd
  • 3,184
  • 3
  • 41
  • 71