Hi,

We use httpclient for quite some time now, and as we now use 3.0
I'm currently suppressing usage of deprecated methods/classes.

To implemented multipart/related content-type, we had a
MultipartRelatedPostMethod class inheriting from
MultipartPostMethod, thus in the light of new request entity
stuff I have created a MultipartRelatedRequestEntity inheriting
from MultipartRequestEntity.

But it is very frustrating to see that the only needed change
compared to MultipartRequestEntity is the content-type (the base
name is different, and it needs a start= parameter and an
optional type= parameter), but the way the mother class protects
its data makes it very difficult: the content-type needs the
multipart boundary, and getMultipartBoundary() is private (it
also needs the name of the first part, but the parts are
private); then duplicating this code creates another problem
because it needs the params (HttpMethodParams) which is also
private, and generateMultipartBoundary() which is also private.
In the end, I'm duplicating half the code of the mother class.

Would it be possible to consider moving the visibility of the
parts and getMultipartBoundary() from private to protected?

Don't hesitate to yell at me if there was an obvious solution
I've missed. I have found some on-topic information in the
archives[1] but I was unable to find the "multipart related code"
in 3.0-rc4.

I'm still not sure why official httpclient doesn't provide a
multipart/related implementation (with discussed visibility
changes, it's barely a 30-line class).

Thanks for your time.

[1] http://www.mail-archive.com/[email protected]/msg02121.html

-- 
Guillaume Cottenceau

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to