Hi all,

Apologies if I’ve been down this road before on this list. The
HttpClient 4.5 library has changed the way multipart works (from some
earlier 4.x where I had it working).

Near as I can tell from looking at the multipart examples in 4.5,
they’re all geared towards file uploading. I’m not interested in file
uploading, I want to construct a payload for a web service that’s
expecting a multipart/mixed request: I want complete control over the
parts, the headers associated with those parts, their content types,
etc.

I stumbled from HttpClient to MIME4J, prehaps on the advice of someone
from this list. I got a little further that way, at least in as much
as I now believe I’ve constructed a mime4j.message that is logically
what I want to send.

But I cannot see how to get from that back to an HttpEntity that I can
set as the entity for an HttpClient request.

Does anyone have an example of sending a fully general multipart/mixed
example? Or is anyone familiar enough with both HttpClient and MIME4J
to point me to an explanation of how to turn one of those into a
request Entity?

(Multipart is only one possibility so I’d really, really rather not
have to have two entirely different code paths where I use HttpClient
for some requests and use direct serialization of MIME4J payloads over
a URLConnection for the other.)

Help and advice most humbly solicited.

                                        Be seeing you,
                                          norm

-- 
Norman Walsh <n...@nwalsh.com> | Why do writers write? Because it isn't
http://nwalsh.com/            | there.--Thomas Berger

Attachment: signature.asc
Description: PGP signature

Reply via email to