SaveUnmatchedRequests (#703)

This commit is contained in:
Stef Heyenrath
2021-12-24 09:34:26 +01:00
committed by GitHub
parent 3e1c3598f7
commit 1d1ff4a418
18 changed files with 180 additions and 85 deletions

View File

@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
@@ -23,7 +23,7 @@ namespace WireMock.Owin.Mappers
/// <inheritdoc cref="IOwinRequestMapper.MapAsync"/>
public async Task<RequestMessage> MapAsync(IRequest request, IWireMockMiddlewareOptions options)
{
(UrlDetails urldetails, string clientIP) = ParseRequest(request);
var (urlDetails, clientIP) = ParseRequest(request);
string method = request.Method;
@@ -68,7 +68,7 @@ namespace WireMock.Owin.Mappers
body = await BodyParser.Parse(bodyParserSettings);
}
return new RequestMessage(urldetails, method, clientIP, body, headers, cookies) { DateTime = DateTime.UtcNow };
return new RequestMessage(urlDetails, method, clientIP, body, headers, cookies) { DateTime = DateTime.UtcNow };
}
private (UrlDetails UrlDetails, string ClientIP) ParseRequest(IRequest request)