Team,
Was testing form paramaters feature in Wirmeock 3 and noticed syntax error in documentation.
Example in documentation does not works because the willreturn method is at wrong place.
stubFor(post(urlPathEqualTo("/mock"))
.withFormParam("tool", equalTo("WireMock"))
).willReturn(ok()));
Suggested Edits
Replace with below snippet:
stubFor(post(urlPathEqualTo("/mock"))
.withFormParam("tool", equalTo("WireMock"))
.willReturn(ok()));
Page
/docs/request-matching/
Details
Team, Was testing form paramaters feature in Wirmeock 3 and noticed syntax error in documentation. Example in documentation does not works because the willreturn method is at wrong place. stubFor(post(urlPathEqualTo("/mock")) .withFormParam("tool", equalTo("WireMock")) ).willReturn(ok()));
Suggested Edits
Replace with below snippet: stubFor(post(urlPathEqualTo("/mock")) .withFormParam("tool", equalTo("WireMock")) .willReturn(ok()));
References
https://wiremock.org/docs/request-matching/#request-with-form-parameters