[ 
https://issues.apache.org/jira/browse/HTTPCLIENT-352?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Roland Weber resolved HTTPCLIENT-352.
-------------------------------------

       Resolution: Fixed
    Fix Version/s:     (was: 4.0 Final)
                   4.0 Alpha 3

With the new API, this issue is no longer relevant. You add parameters to 
UrlEncodedFormEntity (currently in package o.a.h.client.methods) and set that 
entity on the request you want to execute, no matter what method.

cheers,
  Roland

> Allow polymorphic use of addParameter
> -------------------------------------
>
>                 Key: HTTPCLIENT-352
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-352
>             Project: HttpComponents HttpClient
>          Issue Type: Improvement
>          Components: HttpClient
>    Affects Versions: 2.0 Final
>         Environment: Operating System: other
> Platform: Other
>            Reporter: Ron Bodkin
>            Priority: Minor
>             Fix For: 4.0 Alpha 3
>
>
> I have some common code (in a reverse proxy server) that uses addParameter on 
> instances of both PostMethod and MultipartPostMethod
> It would be great if either addParameter were made an abstract method on 
> ExpectContinueMethod or both were made to implement a common base class. 
> Here's 
> my workaround:
>     private void addPostParameter(ExpectContinueMethod method, String name, 
> String value) {
>         if (method instanceof PostMethod) {
>             ((PostMethod)method).addParameter(name, value);
>         } else if (method instanceof MultipartPostMethod) {
>             ((MultipartPostMethod)method).addParameter(name, value);
>         } else {
>             throw new IllegalArgumentException("addPostParameter is only 
> defined for PostMethod and MultipartPostMethod");
>         }
>         
>     }
>     // whoa - smells pretty bad

-- 
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to