Hi Oleg,

Yes, that answers my question, thanks.

Scott.

Oleg Kalnichevski wrote:
On Thu, 2009-11-12 at 15:47 +1100, Scott Yeadon wrote:
Hi,

Using HTTP components 4.0 I wanted to create a POST request using the multipart/mixed content type. However the MultipartEntity does not allow the contentType to be set and is hardcoded to multipart/form-data. Looking through the API it looks as though the HttpMultipart class (and its associated classes) are available to address the various multipart media types, however it appears to be incompatible with HttpPost addPart method as HttpMultipart does not implement the HttpEntity interface. I could not locate an obvious class used for request handling for "HttpMultipart"-based requests. It appears the simplest means to POST a request with multipart/mixed contentType is to create a new entity class implementing HttpEntity (e.g. MultipartMixedEntity) - is that correct or are there other means of doing this with the 4.0 API?


You will be better off just overriding the #generateContentTypre method
of the MultipartEntity class.


Also, what is the relation between these sets of entity classes - the HttpEntity implentations appear in the "entity" package and the others appear in the "mime" package? Is there some sort of de-lineation or usage rules for these classes I should be aware of?


HttpMime is somewhat special because it is not fully API stable due to
its dependency on Mime4j, which is still considered API unstable.
Hope this answers your question.

Oleg

Thanks.

Scott.

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




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




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

Reply via email to