Код: Выделить всё
import org.springframework.web.client.RestClient;
...
RestClient restClient = RestClient.create();
return restClient.get()
.uri(url)
.header("Authorization", token)
.retrieve()
.body(CustomType.class);
Код: Выделить всё
import org.springframework.web.client.RestClient;
...
RestClient restClient = RestClient.create();
return restClient.get()
.uri(url)
.header("Authorization", token)
.retrieve()
.body(ArrayList.class);
Подробнее здесь: https://stackoverflow.com/questions/787 ... t-response
Мобильная версия