Good day! In my negative test cases I have to PUT a request without Content-Type header in order to match desired 4xx status code. The problem is karate automatically sets an appropriate Content-Type. E.g. when I pass {} as request it sets application/json; charset=UTF-8 when I pass '' as request it sets text/plain; charset=UTF-8
The question is how can I send a PUT request without a Content-Type header?
Just set * configure charset = null
:
Here is the documentation: https://github.com/intuit/karate#configure
For a detailed example, see: content-type.feature
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With