I'm having some problems with a webresource. I want to pass encoded parameter to my request. Thing is that when I use URLEncoder.encode, it encoded well my param, but when I execute the request jersey will encode it again.
If I pass my param without encoding before, jersey will not encode it.
This is weird. Any solutions?
here some of my code :
WebResource webResource = this.resource(this.myURL, login, password);
webResource.addFilter(new com.sun.jersey.api.client.filter.LoggingFilter());
String paramEncoded = URLEncoder.encode(param);
try {
certificateTool.disableSslChecks();
userInfosAccessRights = webResource.path("getInfos").
queryParam("id", paramEncoded).
get(MyClass.class);
} catch (UniformInterfaceException exc) {
param is : tvR1AwZ/4YrsCp0TKV3/od+tHeMeB/u8Y68cPpAEwoM= encoded param : tvR1AwZ%2F4YrsCp0TKV3%2Fod%2BtHeMeB%2Fu8Y68cPpAEwoM%3D
param in the request : tvR1AwZ%252F4YrsCp0TKV3%252Fod%252BtHeMeB%252Fu8Y68cPpAEwoM%253D
Thanks