Creating a request with OData parameters that includes a comma
See original GitHub issueHi, 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:
public void SetUp(string body, string path)
{
var response = Response
.Create()
.WithBody(body)
.WithHeader("content-type", "application/json; charset=utf-8")
.WithStatusCode(200);
var request = Request
.Create()
.WithPath(path)
.WithParam("$filter", "startswith(name,'testName')")
.UsingGet();
_server.Given(request).RespondWith(response);
}
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?
Issue Analytics
- State:
- Created a year ago
- Comments:6
Top Results From Across the Web
I need an example of a request to the OData API for returning ...
4. I'm having trouble with the comma separated list of field names that is supposed to be sent back as the resultParameter.
Read more >URL Conventions (OData Version 3.0)
The sopParameterNameAndValue syntax rule defines the grammar for specifying any parameters to the service operation in the query part of the request URL....
Read more >URI Conventions (OData Version 2.0)
A URI with a $inlinecount System Query Option specifies that the response to the request includes a count of the number of Entries...
Read more >Modifying responses with query parameters - OneDrive API
Here is a table of optional OData query parameters you can use in your OneDrive API requests. Comma-separated list of relationships to expand ......
Read more >Parameter with comma - Radzen IDE (Angular)
Hello. I'm making a application with Radzen that integrates with an ERP and on the MSSQL database of the ERP there is a...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

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)
@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)