使用邮递员模拟服务器时出现问题。它不响应具有路由参数的请求。例如,我的uri看起来像这样:
PUT : {{server_url}}/order/{id}
但是当我以这种方式调用mock服务器时:
{{mock_server}}/order/{id}
或
{{mock_server}}/order/1 or any other examples
模拟服务器响应是:
{
"error": {
"name": "mockRequestNotFoundError",
"message": "We were unable to find any matching requests for this method type and the mock path, '/fa/order/', in your collection."
}
}
身体可以帮助我吗?
答案 0 :(得分:2)
您可以将已保存的示例编辑为PUT : {{server_url}}/order/1
然后
PUT {{mock_server}}/order/1
或PUT {{mock_server}}/order/5
或PUT {{mock_server}}/order/<any number>
应该有效。