Cannot match url with query parameters when both contain regular expressions
See original GitHub issuethe following stub mapping:
{
"request" : {
"urlPath" : "/partners/[0-9]+/agents/[0-9]+/reports/loans/DAILY",
"method" : "GET",
"queryParameters" : {
"page" : {
"matches" : "[0-9]+"
},
"per_page" : {
"matches" : "[0-9]+"
}
}
},
"response" : {
"status" : 200
}
}
cannot match /partners/1/agents/1/reports/loans/DAILY?page=1&per_page=10
Issue Analytics
- State:
- Created 7 years ago
- Comments:16
Top Results From Across the Web
Cannot match url with query parameters when both contain ...
Ah, I see the problem - you're using urlPath which is for an exact match, not regex. urlPathMatching should do it.
Read more >Regex to match specific path with specific query param
I'm struggling with creating regex to match URL path with query param that could be in any place. ... This regex works only...
Read more >Query parameter targeting - Optimize Resource Hub
URLs can contain multiple query parameters, called query components. ... Regex matches are useful when the stem, trailing parameters, or both, ...
Read more >How to Use Regular Expressions for Page Targeting and IP ...
A Regular Expression, REGEX, is a special text string for describing a search pattern. Within Hotjar, you can use Regular Expressions to target...
Read more >Working with regex match conditions - AWS Documentation
A regex match condition is a type of string match condition that identifies the pattern ... Any parameter that you have defined as...
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
The example in this documentation still uses
urlPath
.If you’re having trouble getting a stub to match I suggest posting a question on the mailing list with full code, configuration and the request you’re making.