Spring RestTemplate postForObject with Header: webservice can't find my header parameters

送分小仙女□ 提交于 2019-12-02 16:15:51

You're setting a header indicating you're posting a form (APPLICATION_FORM_URLENCODED), but then setting companyId and password as HTTP headers.

I suspect you want those fields to be in the body of your request.

You're also creating an HttpEntity<String> which indicates you're going to post a request body containing a String, but you're providing headers but no String.

If that doesn't help you fix it perhaps you can explain what the request is supposed to look like.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!