有了 REST Assured,我想创建自动化测试,当 Content-Type=application/json 时,在请求中发送非 UTF-8 字符?
使用 Postman 就可以正常工作:
{
"billingAddress": {
"address": "𠜎"
}
}
,但是有了 REST Assured,它看起来像这样:
{
"billingAddress": {
"address": "𠜎"
}
}
有什么建议吗?
尝试在您的请求中设置 contentType
"UTF-8"
类似这样的东西
.contentType("UTF-8")
.body(requestBody)
// some condition here