RequestMessageParamMatcher supports Ignore Case for the key (#254)

* RequestMessageParamMatcher

* /o:

* 1.0.8
This commit is contained in:
Stef Heyenrath
2019-03-12 14:42:52 +01:00
committed by GitHub
parent 62550b61e8
commit 1392119f9d
12 changed files with 202 additions and 70 deletions

View File

@@ -265,7 +265,7 @@ namespace WireMock.Server
request.WithPath(requestMessage.Path);
request.UsingMethod(requestMessage.Method);
requestMessage.Query.Loop((key, value) => request.WithParam(key, value.ToArray()));
requestMessage.Query.Loop((key, value) => request.WithParam(key, false, value.ToArray()));
requestMessage.Cookies.Loop((key, value) => request.WithCookie(key, value));
var allBlackListedHeaders = new List<string>(blacklistedHeaders) { "Cookie" };
@@ -685,7 +685,8 @@ namespace WireMock.Server
{
foreach (var paramModel in requestModel.Params.Where(c => c.Matchers != null))
{
requestBuilder = requestBuilder.WithParam(paramModel.Name, paramModel.Matchers.Select(MatcherMapper.Map).Cast<IStringMatcher>().ToArray());
bool ignoreCase = paramModel?.IgnoreCase ?? false;
requestBuilder = requestBuilder.WithParam(paramModel.Name, ignoreCase, paramModel.Matchers.Select(MatcherMapper.Map).Cast<IStringMatcher>().ToArray());
}
}