filmov
tv
Spring RestTemplate: How to send URL and query parameters of the restful service

Показать описание
I was facing an issue with how to send the Query parameters to the restful Webservices.
My URL was like this, to find out the teams from African Continent
I want to invoke this web service from Spring Boot using Rest Template.
I was getting the below error when sending it along with the URL using the getForObject method,
The code
Error
I fixed this by using the UriComponentsBuilder, code is in this link
My URL was like this, to find out the teams from African Continent
I want to invoke this web service from Spring Boot using Rest Template.
I was getting the below error when sending it along with the URL using the getForObject method,
The code
Error
I fixed this by using the UriComponentsBuilder, code is in this link