Karate automatically sets Content-Type header

前端 未结 2 1805
北荒
北荒 2021-01-23 02:35

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 ap

相关标签:
2条回答
  • 2021-01-23 02:52

    You can pass Content-Type by using the below line:

    And header Content-Type = 'application/json; charset=utf-8'

    0 讨论(0)
  • 2021-01-23 02:53

    Just set * configure charset = null:

    Here is the documentation: https://github.com/intuit/karate#configure

    For a detailed example, see: content-type.feature

    0 讨论(0)
提交回复
热议问题