Spring RestTemplate gives “500” error but same URL, credentails works in RestClient and Curl

后端 未结 7 1760
眼角桃花
眼角桃花 2020-12-30 03:06

An Url, Credentials works in RestClient UI as well as with Curl where as i\'m getting \"500\" error when access the same via Spring RestTemplate.

I am using the foll

7条回答
  •  礼貌的吻别
    2020-12-30 03:11

    Below works fine

    For Post:

    restTemplate.postForObject(url, parametersMap, Employee.class);

    url is : String - rest api URL parametersMap - MultiValueMap Employee - object which needs to be converted from the JSON response

提交回复
热议问题