I am trying to retrieve an online image content in a Spring Boot application by using the below Feign client.
@FeignClient(name = "image")
public interface ImageClient {
@RequestMapping(method = RequestMethod.GET)
byte[] getContent(URI uri) throws WebException;
}
The issue that I have is that when I call the getContent method with an URL such as https://images.foo.com/1234567/5c5a7f14-d5d4-4a79-9c2e-78fed8b738c5.jpeg?foo=123, the HTTP call is made to https://images.foo.com/1234567/5c5a7f14-d5d4-4a79-9c2e-78fed8b738c5.jpeg/?foo=123 and I get an error from the server.
Is there any way to prevent Feign from adding a slash before the query parameters ?