mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-03-17 23:03:46 +01:00
80 lines
3.0 KiB
C#
80 lines
3.0 KiB
C#
using JetBrains.Annotations;
|
|
using System;
|
|
using WireMock.Matchers;
|
|
using WireMock.Matchers.Request;
|
|
using WireMock.Util;
|
|
|
|
namespace WireMock.RequestBuilders
|
|
{
|
|
/// <summary>
|
|
/// The BodyRequestBuilder interface.
|
|
/// </summary>
|
|
public interface IBodyRequestBuilder : IRequestMatcher
|
|
{
|
|
/// <summary>
|
|
/// WithBody: IMatcher
|
|
/// </summary>
|
|
/// <param name="matcher">The matcher.</param>
|
|
/// <returns>The <see cref="IRequestBuilder"/>.</returns>
|
|
IRequestBuilder WithBody([NotNull] IMatcher matcher);
|
|
|
|
/// <summary>
|
|
/// WithBody: IMatcher[]
|
|
/// </summary>
|
|
/// <param name="matchers">The matchers.</param>
|
|
/// <returns>The <see cref="IRequestBuilder"/>.</returns>
|
|
IRequestBuilder WithBody([NotNull] IMatcher[] matchers);
|
|
|
|
/// <summary>
|
|
/// WithBody: Body as string
|
|
/// </summary>
|
|
/// <param name="body">The body.</param>
|
|
/// <param name="matchBehaviour">The match behaviour.</param>
|
|
/// <returns>The <see cref="IRequestBuilder"/>.</returns>
|
|
IRequestBuilder WithBody(string body, MatchBehaviour matchBehaviour = MatchBehaviour.AcceptOnMatch);
|
|
|
|
/// <summary>
|
|
/// WithBody: Body as byte[]
|
|
/// </summary>
|
|
/// <param name="body">The body.</param>
|
|
/// <param name="matchBehaviour">The match behaviour.</param>
|
|
/// <returns>The <see cref="IRequestBuilder"/>.</returns>
|
|
IRequestBuilder WithBody(byte[] body, MatchBehaviour matchBehaviour = MatchBehaviour.AcceptOnMatch);
|
|
|
|
/// <summary>
|
|
/// WithBody: Body as object
|
|
/// </summary>
|
|
/// <param name="body">The body.</param>
|
|
/// <param name="matchBehaviour">The match behaviour.</param>
|
|
/// <returns>The <see cref="IRequestBuilder"/>.</returns>
|
|
IRequestBuilder WithBody(object body, MatchBehaviour matchBehaviour = MatchBehaviour.AcceptOnMatch);
|
|
|
|
/// <summary>
|
|
/// WithBody: func (string)
|
|
/// </summary>
|
|
/// <param name="func">The function.</param>
|
|
/// <returns>The <see cref="IRequestBuilder"/>.</returns>
|
|
IRequestBuilder WithBody([NotNull] Func<string, bool> func);
|
|
|
|
/// <summary>
|
|
/// WithBody: func (byte[])
|
|
/// </summary>
|
|
/// <param name="func">The function.</param>
|
|
/// <returns>The <see cref="IRequestBuilder"/>.</returns>
|
|
IRequestBuilder WithBody([NotNull] Func<byte[], bool> func);
|
|
|
|
/// <summary>
|
|
/// WithBody: func (json object)
|
|
/// </summary>
|
|
/// <param name="func">The function.</param>
|
|
/// <returns>The <see cref="IRequestBuilder"/>.</returns>
|
|
IRequestBuilder WithBody([NotNull] Func<object, bool> func);
|
|
|
|
/// <summary>
|
|
/// WithBody: func (BodyData object)
|
|
/// </summary>
|
|
/// <param name="func">The function.</param>
|
|
/// <returns>The <see cref="IRequestBuilder"/>.</returns>
|
|
IRequestBuilder WithBody([NotNull] Func<IBodyData, bool> func);
|
|
}
|
|
} |