// TODO error handling, 429 handling
private void execute(Object args, String url, HttpHeaders headers, HttpMethod method) {
        HttpEntity<Object> entity = new HttpEntity<>(args, headers);
        ResponseEntity<Object> response = restTemplate.exchange(url, method, entity, Object.class);
        if (response.getStatusCode().is2xxSuccessful()) {
            System.out.println(response.getBody());
        } else {
            System.out.println("error! " + response.getStatusCode().name() + ": " + response.getBody());
        }
    }
private void execute(Object args, String url, HttpHeaders headers, HttpMethod method) {
HttpEntity<Object> entity = new HttpEntity<>(args, headers);
ResponseEntity<Object> response = restTemplate.exchange(url, method, entity, Object.class);
if (response.getStatusCode().is2xxSuccessful()) {
System.out.println(response.getBody());
} else {
System.out.println("error! " + response.getStatusCode().name() + ": " + response.getBody());
}
}
private void execute(Object args, String url, HttpHeaders headers, HttpMethod method) {
HttpEntity<Object> entity = new HttpEntity<>(args, headers);
ResponseEntity<Object> response = restTemplate.exchange(url, method, entity, Object.class);
if (response.getStatusCode().is2xxSuccessful()) {
System.out.println(response.getBody());
} else {
System.out.println("error! " + response.getStatusCode().name() + ": " + response.getBody());
}
}
private void execute(Object args, String url, HttpHeaders headers, HttpMethod method) {
HttpEntity<Object> entity = new HttpEntity<>(args, headers);
ResponseEntity<Object> response = restTemplate.exchange(url, method, entity, Object.class);
if (response.getStatusCode().is2xxSuccessful()) {
System.out.println(response.getBody());
} else {
System.out.println("error! " + response.getStatusCode().name() + ": " + response.getBody());
}
}