You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "Antonio Anzivino (JIRA)" <ji...@apache.org> on 2017/01/20 09:39:27 UTC
[jira] [Created] (HTTPCLIENT-1804)
RequestBuilder.post().addParameter has no effect. Need to keep using
deprecated method
Antonio Anzivino created HTTPCLIENT-1804:
--------------------------------------------
Summary: 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