Comments (5)
I guess you want to match parameters?
Then you can use something like:
... Create().WithParam("bar", "1", "2");
which will match an url like : http://localhost/foo?bar=1&bar=2
from wiremock.net.
Thanks StefH.
But, I'm using a .json configured mapping something like this....
{
"Request": {
"Path": {
"Matchers": [
{
"Name": "WildcardMatcher",
"Pattern": "/config/api/foundation/economic-regions/search"
}
]
},
"Methods": [
"get"
]
},
"Response": {
"BodyAsJson": _{"Response_Json": "Goes here"}_,
"Headers": {
"Content-Type": "application/json"
}
}
}
so your Create().WithParam("bar", "1", "2"); would be a RequestMessageParamMatcher? and at what level in the above config .json's "Request" would it go?
from wiremock.net.
Maybe a better option would be to use the RegexMatcher to create a regular expression which matches your url
from wiremock.net.
Sorry for the late response. I've got the response mapped using .withParam(); and got my mapping.json file configured using it. Thanks again.
from wiremock.net.
Cool !
from wiremock.net.
Related Issues (20)
- Master branch doesn't build HOT 1
- C# Unit test: Wiremock Server runs but does not deliver response HOT 2
- Docs: Documentation is misleading/incomplete for BodyAsFile HOT 1
- Response Templating complex objects HOT 11
- Connection prematurely closed BEFORE response HOT 3
- Request Matching JsonPathMatcher Partially
- WireMock.Net.Client Request Builder Matchers HOT 8
- AbstractJsonPartialMatcher: Regex Value is Uppercased when IgnoreCase is set to true HOT 2
- Generating mappings from Payroc open-api file gives ArgumentException: Property with the same name already exists on object HOT 10
- Error in RequestMessageMultiPartMatcher HOT 3
- WireMock.Org.RestClient vs WireMock.Net.RestClient? HOT 1
- XML transformation HOT 7
- Request matching WithProbability strange behaviour
- How do I access admin endpoints if WireMock.Net is hosted behind AWS application load balancer? HOT 11
- Allow WithMappings to support scanning SubDirectories when building a WireMockContainer HOT 4
- WireMock.Org nullable properties and defaults HOT 4
- FormEncoded Request fails (404 Not Found) if key value pairs order in mapping is different from request body order HOT 19
- Using google.protobuf.Empty as response results in a bad gRPC response HOT 3
- Response is auto converting string to guid HOT 2
- Bump Request CS-Script 4.8.13 to 4.8.17 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wiremock.net.