Making authenticated POST requests with Spring RestTemplate for Android
Ok found the answer. exchange() is the best way. Oddly the HttpEntity class doesn’t have a setBody() method (it has getBody()), but it is still possible to set the request body, via the constructor. // Create the request body as a MultiValueMap MultiValueMap<String, String> body = new LinkedMultiValueMap<String, String>(); body.add(“field”, “value”); // Note the body … Read more