Files
WireMock.Net/src/WireMock.Net.Abstractions/IRequestMessage.cs
Stef Heyenrath 7fe2c8af78 Update REST Admin interface to support "Get Mapping(s) as C# Code" (#878)
* Add /__admin/mappings/code endpoint

* api

* fix

* .

* fix

* .

* .

* .
2023-01-29 10:24:58 +01:00

152 lines
3.4 KiB
C#

using System;
using System.Collections.Generic;
#if NETSTANDARD1_3_OR_GREATER || NET461
using System.Security.Cryptography.X509Certificates;
#endif
using WireMock.Types;
using WireMock.Util;
namespace WireMock;
/// <summary>
/// IRequestMessage
/// </summary>
public interface IRequestMessage
{
/// <summary>
/// Gets the Client IP Address.
/// </summary>
string ClientIP { get; }
/// <summary>
/// Gets the url (relative).
/// </summary>
string Url { get; }
/// <summary>
/// Gets the AbsoluteUrl.
/// </summary>
string AbsoluteUrl { get; }
/// <summary>
/// The ProxyUrl (if a proxy is used).
/// </summary>
string? ProxyUrl { get; set; }
/// <summary>
/// Gets the DateTime.
/// </summary>
DateTime DateTime { get; }
/// <summary>
/// Gets the path (relative).
/// </summary>
string Path { get; }
/// <summary>
/// Gets the AbsolutePath.
/// </summary>
string AbsolutePath { get; }
/// <summary>
/// Gets the path segments.
/// </summary>
string[] PathSegments { get; }
/// <summary>
/// Gets the absolute path segments.
/// </summary>
string[] AbsolutePathSegments { get; }
/// <summary>
/// Gets the method.
/// </summary>
string Method { get; }
/// <summary>
/// Gets the headers.
/// </summary>
IDictionary<string, WireMockList<string>>? Headers { get; }
/// <summary>
/// Gets the cookies.
/// </summary>
IDictionary<string, string>? Cookies { get; }
/// <summary>
/// Gets the query.
/// </summary>
IDictionary<string, WireMockList<string>>? Query { get; }
/// <summary>
/// Gets the query.
/// </summary>
IDictionary<string, WireMockList<string>>? QueryIgnoreCase { get; }
/// <summary>
/// Gets the raw query.
/// </summary>
string RawQuery { get; }
/// <summary>
/// The body.
/// </summary>
IBodyData? BodyData { get; }
/// <summary>
/// The original body as string. Convenience getter for Handlebars.
/// </summary>
string Body { get; }
/// <summary>
/// The body (as JSON object). Convenience getter for Handlebars.
/// </summary>
object BodyAsJson { get; }
/// <summary>
/// The body (as bytearray). Convenience getter for Handlebars.
/// </summary>
byte[] BodyAsBytes { get; }
/// <summary>
/// The detected body type. Convenience getter for Handlebars.
/// </summary>
string DetectedBodyType { get; }
/// <summary>
/// The detected body type from the Content-Type header. Convenience getter for Handlebars.
/// </summary>
string DetectedBodyTypeFromContentType { get; }
/// <summary>
/// The detected compression from the Content-Encoding header. Convenience getter for Handlebars.
/// </summary>
string DetectedCompression { get; }
/// <summary>
/// Gets the Host
/// </summary>
string Host { get; }
/// <summary>
/// Gets the protocol
/// </summary>
string Protocol { get; }
/// <summary>
/// Gets the port
/// </summary>
int Port { get; }
/// <summary>
/// Gets the origin
/// </summary>
string Origin { get; }
#if NETSTANDARD1_3_OR_GREATER || NET461
/// <summary>
/// Gets the connection's client certificate
/// </summary>
X509Certificate2? ClientCertificate { get; }
#endif
}