Add ability to provide multiple values for headers in response (#59)

* Add ability to provide multiple values for headers

* Updated json model
This commit is contained in:
Oleksandr Liakhevych
2017-10-27 22:49:03 +03:00
committed by Stef Heyenrath
parent a96b7bca1e
commit d134684bcb
27 changed files with 305 additions and 187 deletions

View File

@@ -57,13 +57,13 @@ namespace WireMock.Owin
body = bodyEncoding.GetBytes(bodyAsString);
}
Dictionary<string, string> headers = null;
Dictionary<string, string[]> headers = null;
if (request.Headers.Any())
{
headers = new Dictionary<string, string>();
headers = new Dictionary<string, string[]>();
foreach (var header in request.Headers)
{
headers.Add(header.Key, header.Value.FirstOrDefault());
headers.Add(header.Key, header.Value);
}
}