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]