RestTemplate usage

后端 未结 1 2016
栀梦
栀梦 2021-01-14 07:02

I\'m trying to use RestTemplate in order to make a PUT. For some reason I can\'t reproduce the PUT I created using curl t

相关标签:
1条回答
  • 2021-01-14 07:35

    Agghr, so stupid. the missing part was the Accept header. Apparently curl adds Accept: */* by default. It's probably the endpoint implementation that expected proper Accept header. Adding this line solved the problem:

    headers.add("Accept", "*/*");
    
    0 讨论(0)
提交回复
热议问题