【发布时间】:2020-05-02 05:22:26
【问题描述】:
我收到以下错误响应:
{
"error": {
"name": "mockRequestNotFoundError",
"header": "No matching requests",
"message": "Double check your method and the request path and try again."
}
}
当我将- 作为通过模拟服务器创建的 Postman 请求的 URI 参数传递时,与我在不是通过模拟服务器创建的请求中传递相同的 URI 参数值不同,它运行良好!
网址:http://{{host}}/order/{{subUserId}}/{{BusinessDate}}/5
主持人:{mocking-server-url-without-http-keyword}
subUserId:1
营业日期:2020-01-12-17-07-21
HTTP 请求头:x-api-key:{{postman_secret_API_key}}
以mocking server作为主机正确返回数据的主请求:
以mock服务器为主机的mock请求返回错误:
【问题讨论】:
-
你能用完整的 URI 更新问题吗?您在示例或请求中是否使用了其他标头?
标签: unit-testing request mocking postman