hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gerald Turner (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HTTPCLIENT-874) Override method MultipartEntity.addPart so that applications may use FormBodyPart
Date Fri, 04 Sep 2009 17:02:04 GMT

    [ https://issues.apache.org/jira/browse/HTTPCLIENT-874?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12751529#action_12751529
] 

Gerald Turner commented on HTTPCLIENT-874:
------------------------------------------

The patch has method signature addPart(BodyPart), it could've been more specific like addPart(FormBodyPart)
which would make the API less confusing since these classes cross projects (FormBodyPart is
HttpMime, BodyPart is James)

> Override method MultipartEntity.addPart so that applications may use FormBodyPart
> ---------------------------------------------------------------------------------
>
>                 Key: HTTPCLIENT-874
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-874
>             Project: HttpComponents HttpClient
>          Issue Type: Bug
>          Components: HttpMime
>    Affects Versions: 4.0 Final
>            Reporter: Gerald Turner
>            Priority: Trivial
>         Attachments: AddPart.patch
>
>
> FormBodyPart is similar to Part in HttpClient 3.x in that it couples the form name with
the value.  Some applications may find this useful, but cannot really utilize these objects
since there is only MultipartEntity.addPart(String name,ContentBody) and FormBodyPart does
not have a getContent method:
>   entity.addPart(part.getName(), part.getContent()); // Almost but there is no getContent
method
> How about overriding addPart to take a FormBodyPart object:
>   entity.addPart(part);

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


Mime
View raw message