Add setting to skip saving the string-response in the logging when using WithBody(Func...) (#828)

* Add extra unit-test for Response WithBody (dynamic code)

* DoNotSaveDynamicResponseInLogEntry

* update SettingsModel

* fix

* .
This commit is contained in:
Stef Heyenrath
2022-10-21 14:47:26 +02:00
committed by GitHub
parent 306c69f478
commit 57115f1a3d
18 changed files with 362 additions and 198 deletions

View File

@@ -1,41 +1,43 @@
using System.Text;
using WireMock.Types;
namespace WireMock.Util
namespace WireMock.Util;
/// <summary>
/// BodyData
/// </summary>
public class BodyData : IBodyData
{
/// <summary>
/// BodyData
/// </summary>
public class BodyData : IBodyData
{
/// <inheritdoc cref="IBodyData.Encoding" />
public Encoding? Encoding { get; set; }
/// <inheritdoc cref="IBodyData.Encoding" />
public Encoding? Encoding { get; set; }
/// <inheritdoc />
public string? BodyAsString { get; set; }
/// <inheritdoc />
public string? BodyAsString { get; set; }
/// <inheritdoc cref="IBodyData.BodyAsJson" />
public object? BodyAsJson { get; set; }
/// <inheritdoc cref="IBodyData.BodyAsJson" />
public object? BodyAsJson { get; set; }
/// <inheritdoc cref="IBodyData.BodyAsBytes" />
public byte[]? BodyAsBytes { get; set; }
/// <inheritdoc cref="IBodyData.BodyAsBytes" />
public byte[]? BodyAsBytes { get; set; }
/// <inheritdoc cref="IBodyData.BodyAsJsonIndented" />
public bool? BodyAsJsonIndented { get; set; }
/// <inheritdoc cref="IBodyData.BodyAsJsonIndented" />
public bool? BodyAsJsonIndented { get; set; }
/// <inheritdoc cref="IBodyData.BodyAsFile" />
public string? BodyAsFile { get; set; }
/// <inheritdoc cref="IBodyData.BodyAsFile" />
public string? BodyAsFile { get; set; }
/// <inheritdoc cref="IBodyData.BodyAsFileIsCached" />
public bool? BodyAsFileIsCached { get; set; }
/// <inheritdoc cref="IBodyData.BodyAsFileIsCached" />
public bool? BodyAsFileIsCached { get; set; }
/// <inheritdoc cref="IBodyData.DetectedBodyType" />
public BodyType? DetectedBodyType { get; set; }
/// <inheritdoc cref="IBodyData.DetectedBodyType" />
public BodyType? DetectedBodyType { get; set; }
/// <inheritdoc cref="IBodyData.DetectedBodyTypeFromContentType" />
public BodyType? DetectedBodyTypeFromContentType { get; set; }
/// <inheritdoc cref="IBodyData.DetectedBodyTypeFromContentType" />
public BodyType? DetectedBodyTypeFromContentType { get; set; }
/// <inheritdoc cref="IRequestMessage.DetectedCompression" />
public string? DetectedCompression { get; set; }
}
/// <inheritdoc cref="IRequestMessage.DetectedCompression" />
public string? DetectedCompression { get; set; }
/// <inheritdoc />
public string? IsFuncUsed { get; set; }
}