How RESTTemplate Supports for Multipart/mixed in consumption

风流意气都作罢 提交于 2019-12-13 02:09:00

问题


The REST service provider returns a media type of multipart/mixed and it has several boundaries such as application/xml and octstream. Which HttpMessageConverter could be used to satisfy this scenario.

POST: someUrl
Content-Type: multipart/mixed

--edt7Tfrdusa7r3lNQc79vXuhIIMlatb7PQg7Vp
Content-Disposition: form-data; name="meta-data"
Content-Type: application/json; charset=UTF-8
Content-Transfer-Encoding: 8bit

{
"name": "value"
}

--edt7Tfrdusa7r3lNQc79vXuhIIMlatb7PQg7Vp
Content-Disposition: form-data; name="file-data"; filename="file.properties"
Content-Type: text/xml
Content-Transfer-Encoding: 8bit
... File Data ...

Thanks

来源:https://stackoverflow.com/questions/29975099/how-resttemplate-supports-for-multipart-mixed-in-consumption

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