I am trying to access the contents of an API and I need to send a URL using RestTemplate.
String url1 = \"http://api.example.com/Search?key=52ddafbe3ee659bad
You can encode url before using RestTemplate
URLEncoder.encode(data, StandardCharsets.UTF_8.toString());