Отправка многочастного / смешанного запроса с границами - PullRequest
0 голосов
/ 19 февраля 2019

Я пытаюсь создать смешанный запрос из двух частей:

  • application / x-url-form-закодированный
  • multipart / form-data

Пример запроса:

POST http://sample:8080/api/documents HTTP/1.1
Accept: application/json
Accept-Language: en
API-Version: 2
Content-Type: multipart/mixed; boundary=19D523FB
Host: srv2012r2:8080
Content-Length: 11979
Expect: 100-continue

--19D523FB
Content-Type: multipart/form-data

{"fields":[{"Key":"e9e269b9-867f-4cf6-946f-db49091cd52d","Value":"Simplest document ever.docx"}],"storageappid":"d9ca0630-e4f8-4112-a411-ff04d89f2225"}

--19D523FB
Content-Type: multipart/x-www-form-urlencoded
Content-Disposition: attachment; filename="Simplest+document+ever.docx"

--19D523FB--

Невозможно создать запрос с помощью RestTemplate в Springboot.

...