fix web requests
All checks were successful
deploy / deploy (push) Successful in 42s

This commit is contained in:
Lee
2024-04-06 21:44:42 +01:00
parent efb3281818
commit 29dead7c7c
2 changed files with 4 additions and 4 deletions

View File

@ -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;