I'm confused by your question - are you talking about URI parameters? If you're talking about HttpClient request parameters (parameters which control the behavior of the request), those get/setParameter methods have been deprecated in favor of using RequestConfig on the HttpRequest, and various builder parameters on the HttpClient builder.
Todd Lainhart Rational software IBM Corporation 550 King Street, Littleton, MA 01460-1250 1-978-899-4705 2-276-4705 (T/L) [email protected] From: Ian Phillips <[email protected]> To: [email protected], Date: 07/08/2014 10:22 AM Subject: Recommended way of modifying message params? Hi, What is the recommended ay of modifying message params in HC 4.3? The method AbstractHttpMessage.getParams() has the following deprecation note on it: > Deprecated (4.3) use constructor parameters of configuration API provided by HttpClient Which seems fine advice when constructing a new message, but in my case I want to modify a message that I already have: String link = object.getAsJsonPrimitive(“restApiLink").getAsString(); URIBuilder builder = new URIBuilder(link).setHost("example.com"); HttpGet request = new HttpGet(builder.build()); request.getParams().removeParameter("a"); request.getParams().setParameter("b", 1000); I don’t know the URI in advance as it is being returned, params and all, from a remote API which I do not control. It seems like the recommendation is to manually parse out the returned URI and use the components to construct a new message via the builder API, that can’t be right can it? Cheers, Ian. -- #ifndef __COMMON_SENSE__ #include <std_disclaimer> #endif --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
