diff --git a/src/main/java/eu/dnetlib/openaire/usermanagement/utils/HttpUtils.java b/src/main/java/eu/dnetlib/openaire/usermanagement/utils/HttpUtils.java index 55b5134..b8ea0a5 100644 --- a/src/main/java/eu/dnetlib/openaire/usermanagement/utils/HttpUtils.java +++ b/src/main/java/eu/dnetlib/openaire/usermanagement/utils/HttpUtils.java @@ -11,6 +11,7 @@ import org.springframework.stereotype.Component; import org.springframework.web.client.RestTemplate; import java.io.UnsupportedEncodingException; +import java.net.URLDecoder; import java.net.URLEncoder; import java.nio.charset.Charset; import java.nio.charset.StandardCharsets; @@ -86,12 +87,7 @@ public class HttpUtils { int count = 0; for (Map.Entry param : params.entrySet()) { ret.append(param.getKey()).append("="); - try { - ret.append(URLEncoder.encode(param.getValue(), StandardCharsets.UTF_8.toString())); - } catch (UnsupportedEncodingException e) { - logger.error("UnsupportedEncodingException on param " + param); - return null; - } + ret.append(param.getValue()); count++; if (count != params.entrySet().size()) { ret.append("&");