Files
WireMock.Net/src/WireMock.Net.Abstractions/Models/IBodyData.cs
Stef Heyenrath 78b94d2ebc Add WithBody with IDictionary (form-urlencoded values) (#903)
* .

* x

* fx

* fix

* f

* tests

* fix tests

* add tst
2023-03-17 17:08:45 +01:00

71 lines
1.9 KiB
C#

using System.Collections.Generic;
using System.Text;
using WireMock.Types;
namespace WireMock.Util;
/// <summary>
/// IBodyData
/// </summary>
public interface IBodyData
{
/// <summary>
/// The body (as bytearray).
/// </summary>
byte[]? BodyAsBytes { get; set; }
/// <summary>
/// Gets or sets the body as a file.
/// </summary>
string? BodyAsFile { get; set; }
/// <summary>
/// Is the body as file cached?
/// </summary>
bool? BodyAsFileIsCached { get; set; }
/// <summary>
/// The body (as JSON object).
/// </summary>
object? BodyAsJson { get; set; }
/// <summary>
/// Gets or sets a value indicating whether child objects to be indented according to the Newtonsoft.Json.JsonTextWriter.Indentation and Newtonsoft.Json.JsonTextWriter.IndentChar settings.
/// </summary>
bool? BodyAsJsonIndented { get; set; }
/// <summary>
/// The body as string, this is defined when BodyAsString or BodyAsJson are not null.
/// </summary>
string? BodyAsString { get; set; }
/// <summary>
/// The body as Form UrlEncoded dictionary.
/// </summary>
IDictionary<string, string>? BodyAsFormUrlEncoded { get; set; }
/// <summary>
/// The detected body type (detection based on body content).
/// </summary>
BodyType? DetectedBodyType { get; set; }
/// <summary>
/// The detected body type (detection based on Content-Type).
/// </summary>
BodyType? DetectedBodyTypeFromContentType { get; set; }
/// <summary>
/// The detected compression.
/// </summary>
string? DetectedCompression { get; set; }
/// <summary>
/// The body encoding.
/// </summary>
Encoding? Encoding { get; set; }
/// <summary>
/// Defines if this BodyData is the result of a dynamically created response-string. (
/// </summary>
public string? IsFuncUsed { get; set; }
}