wiremock/wiremock.org

Issue on Request Matching - Request with Form Parameters - Documentation

rv3183 opened this issue · 0 comments

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