I am using the Spring framework to query an GET endpoint, creating the request as follows:
String url = ...
HttpHeaders httpHeaders = new HttpHeaders();
RequestEntity<?> requestEntity = RequestEntity.get(url).headers(httpHeaders).build();
Now obviously the compiler rejects the "?" as a type, and according to the documentation, the type specified here should be the type of the body.
But this is a GET request. There is no body. How do I use this function? (Removing the <?> altogether does not work either).
Edit: Fixed my example, which, as correctly pointed out by @Nico Van Belle, was missing the .build()