I\'m currently having a really weird issue with calling one REST service from inside another one and I could really use a hand in working out what I\'m doing wrong.
A HTTP415 means Unsupported Media Type. What that means is that isUsernameAvailable
expects input in JSON format, but that isn't what it is getting.
Try explicitly adding Content-Type: application/json
header to your HTTP request by doing the following:
HttpHeaders headers = new HttpHeaders();
headers.setContentType(MediaType.APPLICATION_JSON);
HttpEntity entity = new HttpEntity(requestJson,headers);
restTemplate.put(uRL, entity);