This commit is contained in:
@ -21,12 +21,12 @@ public class WebRequest {
|
||||
* @return the response
|
||||
* @param <T> the type of the response
|
||||
*/
|
||||
public static <T> T get(String url) {
|
||||
public static <T> T get(String url, Class<T> clazz) {
|
||||
try {
|
||||
ResponseEntity<T> profile = CLIENT.get()
|
||||
.uri(url)
|
||||
.retrieve()
|
||||
.toEntity((Class<T>) Object.class);
|
||||
.toEntity(clazz);
|
||||
|
||||
if (profile.getStatusCode().isError()) {
|
||||
return null;
|
||||
|
Reference in New Issue
Block a user