Forum Discussion

Marol's avatar
Marol
Regular Visitor
2 years ago

Additional content-type, charset and Content-Transfer-Encoding in form-data request in SoupUI 5.5.0

Hi, I need send POST request in content-type multipart/form-data using soapUI. I have been sending as on the picture:

And RAW of request looks like:

POST *********************
Accept-Encoding: gzip,deflate
authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6***********************
Content-Type: multipart/form-data; boundary="----=_Part_0_587892885.1676972616430"
MIME-Version: 1.0
Content-Length: 847396
Host: **************
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.1.1 (java 1.5)


------=_Part_0_587892885.1676972616430
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Content-Disposition: form-data; name="title"

Post1
------=_Part_0_587892885.1676972616430
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Content-Disposition: form-data; name="city"

Warszawa
------=_Part_0_587892885.1676972616430
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Content-Disposition: form-data; name="categoryUid"

8c60fa73-52a9-40f3-9622-4c085696d247
------=_Part_0_587892885.1676972616430
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Content-Disposition: form-data; name="description"

Value23
------=_Part_0_587892885.1676972616430
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Content-Disposition: form-data; name="geometry"

{"type":"Point","coordinates":[20.17160152,52.94801537]}
------=_Part_0_587892885.1676972616430
Content-Type: image/jpeg
Content-Transfer-Encoding: binary
Content-Disposition: form-data; name="image"; filename="ExampleImage1920x1280.jpg"

 

You can see the request has content-type multipart/form-data but every part has extra Content-Type: text/plain and charset=UTF-8 and Content-Transfer-Encoding: 7bit


I was trying send the same request in ReadyAPI 3.43.1 and everything was fine. Raw looks like:

POST *****************
Accept-Encoding: gzip,deflate
authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI******************
Content-Type: multipart/form-data; boundary="----=_Part_18_1073884911.1676923710152"
MIME-Version: 1.0
Content-Length: 423814
Host: **************
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.5.2 (Java/17.0.5)

------=_Part_18_1073884911.1676923710152
Content-Disposition: form-data; name="title"

Post1
------=_Part_18_1073884911.1676923710152
Content-Disposition: form-data; name="city"

Warszawa
------=_Part_18_1073884911.1676923710152
Content-Disposition: form-data; name="categoryUid"

8c60fa73-52a9-40f3-9622-4c085696d247
------=_Part_18_1073884911.1676923710152
Content-Disposition: form-data; name="description"

Domyślny post
------=_Part_18_1073884911.1676923710152
Content-Disposition: form-data; name="geometry"

{"type":"Point","coordinates":[20.17160152,52.94801537]}
------=_Part_18_1073884911.1676923710152
Content-Type: image/jpeg
Content-Transfer-Encoding: binary
Content-Disposition: form-data; name="image"; filename="ExampleImage1920x1280.jpg"

 

 

Maybe somebody knows what is the difference and How i can send the request without extra content-type, charset and encoding in all parts of request using SoapUI?

No RepliesBe the first to reply