Add helpers for query params fluent MappingModelBuilder#1425
Add helpers for query params fluent MappingModelBuilder#1425StefH merged 5 commits intowiremock:masterfrom
Conversation
|
@biltongza |
|
The example works with the |
dad76f5 to
b4335c9
Compare
|
@biltongza |
|
Sure, it probably would make sense for cookies. For headers, there is already a |
yes please |
|
@biltongza did you have time to add cookies logic? |
|
Forgot about this! Will get it in tomorrow :) |
b4335c9 to
d251c33
Compare
|
@StefH I pushed the update, wasn't able to test it though. When I try to run the Wiremock.Net.Client app, I get a nice exception from the server: This happened on the latest version (v2.0.0). I also tried it on v1.2.5 and I got a different error: |
|
@biltongza It should be fixed here: When this is merged to main, you can get latest from main and merge into your branch and test if it works correct. |
This PR adds some helper methods to improve the fluent API syntax when adding query params.
I found that adding query parameters with the fluent API was really tedious, compared to how easy it is to set up a body matcher.
For example, if I wanted to match a request to
/api/weather?city=Amsterdamthe code might look something like this:Really long and verbose.
With this PR, we can shorten it to: