【发布时间】:2017-06-08 14:46:58
【问题描述】:
我正在与 mountebank 合作为外部 REST API 创建模拟
这是一个带有 content-type : application/x-www-form-urlencoded 的 POST 请求。
API 的格式
https://<url>/dpay/MPmt
数据负载以msg=01223~20170607114321~ABC~12345~NA~NA格式传递
我必须根据~ABC~12345~ 进行搜索,这将保持不变。
我使用了 contains、matches 和 equals 谓词,但在请求正文中传递有效负载时无法运行它们。
但是,当将有效负载作为查询参数传递时,我能够让它运行
https://url/dpay/MPmt?msg=01223~20170607114321~ABC~12345~NA~NA
但在请求正文中传递时找不到完成它的方法。
任何指针将不胜感激。
【问题讨论】:
标签: rest testing mocking mountebank