public class HttpClientTemplate {
public static String sendPOSTRequest(String url, Map<String, String> params) {
RestTemplate client = new RestTemplate();
HttpHeaders headers = new HttpHeaders();
headers.setContentType(MediaType.APPLICATION_JSON);
HttpEntity<Map<String, String>> r = new HttpEntity<>(params, headers);
String data= client.postForObject(url, r, String.class);
return data;
}
}