mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-04-21 07:51:23 +02:00
Add GetParameter method to IRequestMessage (#942)
This commit is contained in:
@@ -143,6 +143,14 @@ public interface IRequestMessage
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
string Origin { get; }
|
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);
|
||||||
|
|
||||||
#if NETSTANDARD1_3_OR_GREATER || NET461
|
#if NETSTANDARD1_3_OR_GREATER || NET461
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the connection's client certificate
|
/// Gets the connection's client certificate
|
||||||
|
|||||||
@@ -180,12 +180,7 @@ public class RequestMessage : IRequestMessage
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <inheritdoc />
|
||||||
/// 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.</returns>
|
|
||||||
public WireMockList<string>? GetParameter(string key, bool ignoreCase = false)
|
public WireMockList<string>? GetParameter(string key, bool ignoreCase = false)
|
||||||
{
|
{
|
||||||
if (Query == null)
|
if (Query == null)
|
||||||
|
|||||||
Reference in New Issue
Block a user