Skip to content

Commit dc2c683

Browse files
author
Bernt Røskar Brenna
committed
Forgotten change re. optional request recording
1 parent 60b129b commit dc2c683

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

netmockery/Startup.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,10 @@ public async Task HandleRequestInner(ResponseRegistryItem responseRegistryItem,
9191
var matcher_and_creator = endpoint.Resolve(context.Request.Method, context.Request.Path, context.Request.QueryString, requestBody, context.Request.Headers);
9292
if (matcher_and_creator != null)
9393
{
94-
//TODO: Only if configured
95-
_responseRegistry.AddAndWriteIncomingInfoToConsole(responseRegistryItem);
94+
if (endpoint.RecordRequests)
95+
{
96+
_responseRegistry.AddAndWriteIncomingInfoToConsole(responseRegistryItem);
97+
}
9698
var responseCreator = matcher_and_creator.ResponseCreator;
9799

98100
responseRegistryItem.RequestMatcher = matcher_and_creator.RequestMatcher;

0 commit comments

Comments
 (0)