setting content type in rest assured

后端 未结 8 1260
广开言路
广开言路 2021-01-07 21:53

I\'m trying to invoke a rest call using rest assured. My API accepts, \"application/json\" as content type and I need to set in the call. I set the content type

8条回答
  •  粉色の甜心
    2021-01-07 22:30

    As mentioned in previous posts there is a method:

    RequestSpecification.contentType(String value)

    I did not work for me too. But after upgrade to the newest version (in this moment 2.9.0) it works. So please upgrade :)

提交回复
热议问题