- Я пытаюсь загрузить файл XML, используя многоэлементное поле вместе с указанным типом содержимого как application / x- www-form-urlencoded, но граница добавляется в запрос автоматически, и я получаю 415 неподдерживаемый тип носителя в ответ :
Request:
1 > Accept: application/json
1 > Accept-Encoding: gzip,deflate
1 > Authorization: Bearer Pr3wkHwNDDfPh4Ik4IPLhGDcK1zt
1 > Connection: Keep-Alive
1 > Content-Length: 6739
1 > Content-Type: application/x-www-form-urlencoded; boundary=eeErrSgIwFHJn3_hjEi_-Q8_DHkKIo
1 > Host: api-sandbox.apiboitest.com
1 > User-Agent: Apache-HttpClient/4.5.9 (Java/1.8.0_144)
1 > client_id: jYXMYDGq0uTZee5peZpzwR
1 > client_secret:
1 > request_method: POST
1 > x-fapi-financial-id: 1234
1 > x-idempotency-key: qwe3456
1 > x-jws-signature: qqqqq
--eeErrSgIwFHJn3_hjEi_-Q8_DHkKIo
Content-Disposition: form-data; name="myFile"
Content-Type: application/xml; charset=UTF-8
Content-Transfer-Encoding: 8bit
``````````````````````````````````````````````
and Code:
``````````````````````
And multipart field myFile = read('classpath:path')
And multipart field message = 'File'
When method request_method
Then status 200
``````````````````````
while in postman it works fine.