You are viewing a plain text version of this content. The canonical link for it is here.
Posted to httpclient-users@hc.apache.org by Ted Slusser <te...@vanderbilt.edu> on 2012/02/13 21:24:56 UTC

multipart/related

Hello, 

I would like to submit a POST with a specialized Content-Type header.  I would like the Content-Type to be - 

ContentType: multipart/related; type="application/xop+xml"

along with the boundary, etc.

If I set the Content-Type using HttpMessage.setHeader() it interferes with the creation of the boundary parts of the Content-Type.  Is there another way to "plug-in" to the process of creating the Content-Type header or some other way of customizing certain attributes of the Content-Type?

Thanks,

-- 
Ted Slusser
Health Systems Engineer III
Vanderbilt Informatics Center (http://informatics.mc.vanderbilt.edu/)
3401 West End Avenue, Ste 700
Nashville, TN 37203
Cell Phone: (615) 420-7326


"This e-mail is confidential and privileged pursuant to provisions of Section 63-6-219 of Tennessee Code Annotated, the contractual obligations of Vanderbilt University to its insurance companies, the attorney-client privilege and other applicable provisions of law."


Re: multipart/related

Posted by Oleg Kalnichevski <ol...@apache.org>.
On Mon, 2012-02-13 at 14:24 -0600, Ted Slusser wrote:
> Hello, 
> 
> I would like to submit a POST with a specialized Content-Type header.  I would like the Content-Type to be - 
> 
> ContentType: multipart/related; type="application/xop+xml"
> 
> along with the boundary, etc.
> 
> If I set the Content-Type using HttpMessage.setHeader() it interferes with the creation of the boundary parts of the Content-Type.  Is there another way to "plug-in" to the process of creating the Content-Type header or some other way of customizing certain attributes of the Content-Type?
> 
> Thanks,
> 

Subclass MultipartEntity and override its #generateContentType method

Oleg


---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org