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()); } }