mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-01-11 22:30:41 +01:00
Creating a request with OData parameters that includes a comma #464
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @loekensgard on GitHub (Oct 24, 2022).
Hi, I'm trying to create a wiremock response and request that matches on an OData query.
I'm trying to create a basic request like this:
I'm then faced with a problem where the response is returned as a partial match because of the request query, and if I inspect the query later on it appears as two queries (separated by the comma I guess).

Is there anything I can do to make sure that the query-value is not split by the comma?
@StefH commented on GitHub (Oct 24, 2022):
Hello @loekensgard
By default, the application does split on
&,;and,.However I've changed this.
In the settings, set the value
QueryParameterMultipleValueSupportto a desired value.This new functionality is in the preview version
1.5.8-ci-16573.(https://github.com/WireMock-Net/WireMock.Net/wiki/MyGet-preview-versions)
@StefH commented on GitHub (Oct 24, 2022):
https://github.com/WireMock-Net/WireMock.Net/pull/836
@StefH commented on GitHub (Oct 28, 2022):
@loekensgard Did you have time to test this preview version?
@StefH commented on GitHub (Nov 5, 2022):
@loekensgard Can you please test this?
@loekensgard commented on GitHub (Nov 8, 2022):
@StefH
Hi, sorry for my late reply.
I did not get it to work, I tried to specify the QueryParameterMultipleValueSupport but it did not change the output for me. I ended up URL encoding my query params and then it worked without using the preview version. 😄
@StefH commented on GitHub (Nov 8, 2022):
@loekensgard
Good to hear that you found another way.
(Note that I will still merge the PR to master, just to be more flexible in the future)