I try to do a simple rest call with springs resttemplate:
private void doLogout(String endpointUrl, String sessionId) {
template.getForObject("http://{enpointUrl}?method=logout&session={sessionId}", Object.class,
endpointUrl, sessionId);
}
Where the endpointUrl variable contains something like service.host.com/api/service.php
Unfortunately, my call results in a org.springframework.web.client.ResourceAccessException: I/O error: service.host.com%2Fapi%2Fservice.php
So spring seems to encode my endpointUrl string before during the creation of the url. Is there a simple way to prevent spring from doing this?
Regards