mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-04-03 15:37:01 +02:00
* Version 2.x * Setup .NET 9 * 12 * cleanup some #if for NETSTANDARD1_3 * cleanup + fix tests for net8 * openapi * NO ConfigureAwait(false) + cleanup * . * #endif * HashSet * WireMock.Net.NUnit * HttpContext * Add WebSockets (#1423) * Add WebSockets * Add tests * fix * more tests * Add tests * ... * remove IOwin * - * tests * fluent * ok * match * . * byte[] * x * func * func * byte * trans * ... * frameworks......... * jmes * xxx * sc * using var httpClient = new HttpClient(); * usings * maxRetries * up * xunit v3 * ct * --- * ct * ct2 * T Unit * WireMock.Net.TUnitTests / 10 * t unit first * --project * no tunit * t2 * --project * --project * ci - --project * publish ./test/wiremock-coverage.xml * windows * . * log * ... * log * goed * BodyType * . * . * --scenario * ... * pact * ct * . * WireMock.Net.RestClient.AwesomeAssertions (#1427) * WireMock.Net.RestClient.AwesomeAssertions * ok * atpath * fix test * sonar fixes * ports * proxy test * FIX? * --- * await Task.Delay(100, _ct); * ? * --project * Aspire: use IDistributedApplicationEventingSubscriber (#1428) * broadcast * ok * more tsts * . * Collection * up * . * 2 * remove nfluent * <VersionPrefix>2.0.0-preview-02</VersionPrefix> * ... * . * nuget icon * . * <PackageReference Include="JmesPath.Net" Version="1.1.0" /> * x * 500 * . * fix some warnings * ws
170 lines
4.0 KiB
C#
170 lines
4.0 KiB
C#
// Copyright © WireMock.Net
|
|
|
|
using System.Security.Cryptography.X509Certificates;
|
|
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 HTTP Version.
|
|
/// </summary>
|
|
string HttpVersion { 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 and WireMockAssertions.
|
|
/// </summary>
|
|
string? Body { get; }
|
|
|
|
/// <summary>
|
|
/// The body (as JSON object).
|
|
/// Convenience getter for Handlebars and WireMockAssertions.
|
|
/// </summary>
|
|
object? BodyAsJson { get; }
|
|
|
|
/// <summary>
|
|
/// The body (as bytearray).
|
|
/// Convenience getter for Handlebars and WireMockAssertions.
|
|
/// </summary>
|
|
byte[]? BodyAsBytes { get; }
|
|
|
|
/// <summary>
|
|
/// The original body as MimeMessage.
|
|
/// Convenience getter for Handlebars and WireMockAssertions.
|
|
/// </summary>
|
|
Models.Mime.IMimeMessageData? BodyAsMimeMessage { 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; }
|
|
|
|
/// <summary>
|
|
/// Get a query parameter.
|
|
/// </summary>
|
|
/// <param name="key">The key.</param>
|
|
/// <param name="ignoreCase">Defines if the key should be matched using case-ignore.</param>
|
|
/// <returns>The query parameter value as WireMockList or null when not found.</returns>
|
|
WireMockList<string>? GetParameter(string key, bool ignoreCase = false);
|
|
|
|
/// <summary>
|
|
/// Gets the connection's client certificate
|
|
/// </summary>
|
|
X509Certificate2? ClientCertificate { get; }
|
|
} |