mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-06-13 09:04:31 +02:00
36b0a93a6c
* SystemTextJsonMatcher * , * . * new projectx * Update test/WireMock.Net.Tests/Pact/PactTests.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update test/WireMock.Net.Tests/WebSockets/WebSocketIntegrationTests.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update src/WireMock.Net/WireMock.Net.csproj Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update src/WireMock.Net.Minimal/Properties/AssemblyInfo.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * . * more tests * . * . * x * ... * . * fix tests * 0.11.0 * . * delete jsonutils.cs * s * fix findings * Apply suggestions from code review Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com> * Potential fix for pull request finding 'Missing Dispose call on local IDisposable' Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com> * JsonConverter 0.12.0 * -- tools --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
48 lines
1.4 KiB
C#
48 lines
1.4 KiB
C#
// Copyright © WireMock.Net
|
|
|
|
using JsonConverter.Abstractions;
|
|
using JsonConverter.Newtonsoft.Json;
|
|
|
|
namespace WireMock.Util;
|
|
|
|
internal class BodyParserSettings
|
|
{
|
|
/// <summary>
|
|
/// The body stream to parse.
|
|
/// </summary>
|
|
public Stream Stream { get; set; } = null!;
|
|
|
|
/// <summary>
|
|
/// The (optional) content type of the body.
|
|
/// </summary>
|
|
public string? ContentType { get; set; }
|
|
|
|
/// <summary>
|
|
/// The (optional) content encoding of the body.
|
|
/// </summary>
|
|
public string? ContentEncoding { get; set; }
|
|
|
|
/// <summary>
|
|
/// Automatically decompress GZip and Deflate encoded content.
|
|
/// </summary>
|
|
public bool DecompressGZipAndDeflate { get; set; } = true;
|
|
|
|
/// <summary>
|
|
/// Try to deserialize the body as JSON.
|
|
/// </summary>
|
|
public bool DeserializeJson { get; set; } = true;
|
|
|
|
/// <summary>
|
|
/// Try to deserialize the body as FormUrlEncoded.
|
|
/// </summary>
|
|
public bool DeserializeFormUrlEncoded { get; set; } = true;
|
|
|
|
/// <summary>
|
|
/// Gets or sets the default JSON converter used for deserialization.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Set this property to customize how objects are serialized to and deserialized from JSON during mapping.
|
|
/// Default is <see cref="NewtonsoftJsonConverter"/>.
|
|
/// </remarks>
|
|
public IJsonConverter DefaultJsonConverter { get; set; } = new NewtonsoftJsonConverter();
|
|
} |