How RESTTemplate Supports for Multipart/mixed in c

2019-08-12 06:20发布

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

0条回答
登录 后发表回答