HandleRequestsSynchronously (#496)

This commit is contained in:
Stef Heyenrath
2020-08-07 08:08:54 +02:00
committed by GitHub
parent c4ee91c614
commit b55435ddac
10 changed files with 54 additions and 15 deletions

View File

@@ -1,13 +1,13 @@
using System;
using WireMock.Settings;
namespace WireMock.Server
{
[Obsolete("Use WireMockServer. This will removed in next version (1.3.x)")]
public class FluentMockServer : WireMockServer
{
public FluentMockServer(IFluentMockServerSettings settings) : base((IWireMockServerSettings) settings)
{
}
}
using WireMock.Settings;
namespace WireMock.Server
{
[Obsolete("Use WireMockServer. This will removed in next version (1.3.x)")]
public class FluentMockServer : WireMockServer
{
public FluentMockServer(IFluentMockServerSettings settings) : base((IWireMockServerSettings) settings)
{
}
}
}

View File

@@ -344,7 +344,8 @@ namespace WireMock.Server
MaxRequestLogCount = _options.MaxRequestLogCount,
RequestLogExpirationDuration = _options.RequestLogExpirationDuration,
GlobalProcessingDelay = (int?)_options.RequestProcessingDelay?.TotalMilliseconds,
AllowBodyForAllHttpMethods = _options.AllowBodyForAllHttpMethods
AllowBodyForAllHttpMethods = _options.AllowBodyForAllHttpMethods,
HandleRequestsSynchronously = _options.HandleRequestsSynchronously
};
return ToJson(model);
@@ -371,6 +372,11 @@ namespace WireMock.Server
_options.AllowBodyForAllHttpMethods = settings.AllowBodyForAllHttpMethods.Value;
}
if (settings.HandleRequestsSynchronously != null)
{
_options.HandleRequestsSynchronously = settings.HandleRequestsSynchronously.Value;
}
return ResponseMessageBuilder.Create("Settings updated");
}
#endregion Settings

View File

@@ -217,6 +217,7 @@ namespace WireMock.Server
_options.PostWireMockMiddlewareInit = _settings.PostWireMockMiddlewareInit;
_options.Logger = _settings.Logger;
_options.DisableJsonBodyParsing = _settings.DisableJsonBodyParsing;
_options.HandleRequestsSynchronously = settings.HandleRequestsSynchronously;
_matcherMapper = new MatcherMapper(_settings);
_mappingConverter = new MappingConverter(_matcherMapper);