Just like to add that on server side, I wish to use 
request.getParameter("paramname");
If I use entity.addPart("paramname", new StringBody("paramvalue"), the above 
returns null;


-----Original Message-----
From: Cory Lum 
Sent: Friday, December 14, 2012 4:20 PM
To: [email protected]
Subject: Multiple entities in single Post?

Hi, 

 

I'm trying to include request parameters and a multipart upload in a single 
Post. Is it possible? 

 

HttpPost post = HttpPost();

//adding params

List <NameValuePair> params = .; //assume params

post.setEntity(new UrlEncodedFormEntity(params, HTTP.UTF_8));

 

//over writes params

MultipartEntity entity = new 
MultipartEntity(HttpMultipartMode.BROWSER_COMPATIBLE);

entity.addPart(.); //assume data

post.setEntity(entity);

 

How to set two type of entities?

 

Thanks, 

Cory

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to