Code: Select all
String url = "http://test.com/method";
URI uri=UriComponentsBuilder builder = UriComponentsBuilder.fromUriString(url)
// Add query parameter
.queryParam("testCode", "FqV0ui%3D%3D").build.toURI();
HTTPEntityrequest=new HTTPEntity(requestJson, headers);
restTemplate.exchange(uri , HttpMethod.POST,
request, Object.class);//If we check uri it has value for testCode as FqV0ui%253D%253D.