我正在尝试使用WireMock实现基本查询参数。这是我的密码
stubFor(get(urlEqualTo("/getWithQueryParam?searchFor=WireMock")) .withQueryParam("searchFor" ,equalTo("WireMock")) .willReturn(aResponse() .withStatusMessage("This Page is Authenticated And having query Parameter")));
withQueryParam("searchFor",equalTo(WireMock) 如果我们在 urlEqualTo
withQueryParam("searchFor",equalTo(WireMock)
urlEqualTo
有没有什么方法可以读取queryParam并将其放入响应体中?
ReponseTemplating应用于处理请求参数。当我们使用queryparam时,如果urlEqualTo使用urlPathEqualTo,则将使用urlPathEqualTo