How to POST form data with Spring RestTemplate?
I want to convert the following (working) curl snippet to a RestTemplate call: curl -i -X POST -d “[email protected]” https://app.example.com/hr/email How do I pass the email parameter correctly? The following code results in a 404 Not Found response: String url = “https://app.example.com/hr/email”; Map<String, String> params = new HashMap<String, String>(); params.put(“email”, “[email protected]”); RestTemplate restTemplate = new … Read more