hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Antonio Anzivino (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HTTPCLIENT-1804) RequestBuilder.post().addParameter has no effect. Need to keep using deprecated method
Date Fri, 20 Jan 2017 13:01:26 GMT

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

Antonio Anzivino commented on HTTPCLIENT-1804:
----------------------------------------------

Please do. I was just working at the test case but for some unknown reason (compiled .class
clash?) the code started working as expected. After reducing the case to the unit test and
running it on a mock server I tried to re-run my solution commenting out the deprecated methods
and clearing (several times) the Eclipse workspace, it worked as it should have.

Sorry for bothering but looks like my issue was caused by a transient problem.

> RequestBuilder.post().addParameter has no effect. Need to keep using deprecated method
> --------------------------------------------------------------------------------------
>
>                 Key: HTTPCLIENT-1804
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1804
>             Project: HttpComponents HttpClient
>          Issue Type: Bug
>          Components: HttpClient (classic)
>    Affects Versions: 4.5.2
>            Reporter: Antonio Anzivino
>            Priority: Critical
>
> I want to perform an automated login request to a certain website using HttpClient.
> I did the following
> {code}
> HttpUriRequest sisterSamlRequest = post(URL_SISTERIF_SAML_ENDPOINT)
>                                                                                .addParameter("RelayState",
relayState)
>                                                                                .addParameter("SAMLResponse",
samlResponse)
>                                                                                .build();
> {code}
> But it had no effect on the data transmitted to the server.
> Instead, if I keep using the deprecated methods, that works great
> {code}
> sisterSamlRequest.getParams().setParameter("RelayState", relayState).setParameter("SAMLResponse",
samlResponse);
> {code}
> According to docs (https://hc.apache.org/httpcomponents-client-ga/httpclient/apidocs/org/apache/http/client/methods/RequestBuilder.html#addParameter(java.lang.String,%20java.lang.String))
parameters on POST requests are being added to the entity. Looking at the code, it _looks
like_ it's doing the right job, but in practice it is not.
> So that is why I think this is a bug.
> Thanks



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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


Mime
View raw message