Skip to content

Commit

Permalink
Add GetParameter method to IRequestMessage (#942)
Browse files Browse the repository at this point in the history
  • Loading branch information
StefH authored May 25, 2023
1 parent e61f08f commit 7c3a0c8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
8 changes: 8 additions & 0 deletions src/WireMock.Net.Abstractions/IRequestMessage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,14 @@ public interface IRequestMessage
/// </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);

#if NETSTANDARD1_3_OR_GREATER || NET461
/// <summary>
/// Gets the connection's client certificate
Expand Down
7 changes: 1 addition & 6 deletions src/WireMock.Net/RequestMessage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -180,12 +180,7 @@ internal RequestMessage(
#endif
}

/// <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.</returns>
/// <inheritdoc />
public WireMockList<string>? GetParameter(string key, bool ignoreCase = false)
{
if (Query == null)
Expand Down

0 comments on commit 7c3a0c8

Please sign in to comment.