title: Get and decode a response from RestTemplate spring boot
body: <p>I am encoding a URL and when I get the response back it is encoded as well. What I am having a issue with is decoding it.</p>
  
  <pre><code>String encoded = URLEncoder.encode(text,"UTF-8");
  
          UriComponentsBuilder builder = UriComponentsBuilder
              .fromUriString("https://google.com/translate")
              .queryParam("srcLang", srcLang)
              .queryParam("tgtLang", tgtLang)
              .queryParam("text", encoded);
  
          ResponseEntity&lt;String&gt; response = restTemplate.exchange(builder.toUriString(),HttpMethod.GET, request, String.class);
  </code></pre>
  
  <p>what I was trying to do is:</p>
  
  <p><code>String decodedResult = UriUtils.decode(response.toString(),"UTF-8");</code></p>
  
  <p>But that didn't work.</p>
  
  <p>advice?</p>