Multipart Content-Type header is updated by Karate when sending requests

I provide my header parameters as a json file which looks like below;

{ 
  "Accept": "application/x-ofx",
  "Content-Type" "Multipart/Related; type=text/xml; boundary=---=1234abc;"
}

I have a few more parameters but not as important as these 2 above. So, When I read this from json file and send my request to our api, I see 400 and when I run the same test in debug mode I saw that Content-Type is updated when it is sent as below;

Content-Type: multipart/related; type="text/xml"; boundary="---=1234abc"

I found that we can get rid of charset using configure charset = null I did that. we are fine there. It is also making M and R letters in Multipart/Related lowercase. And there are quotes around type and boundary.

I have sent another request using exact same data except the type in Content-Type being type=application/x-ofx and it is working fine and not updated as lowercase or anything else. What would be the issue here.

Thanks already for your help and support with this great tool.



Read more here: https://stackoverflow.com/questions/66271175/multipart-content-type-header-is-updated-by-karate-when-sending-requests

Content Attribution

This content was originally published by Hilo Doki at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: