/// <summary> /// Sets the content of the request to the specified content. /// </summary> /// <param name="content">The HTTP content.</param> /// <returns>An <see cref="IRequest"/> object that represents the request.</returns> public static IRequest String(this IWith @this, StringContent content) => @this.Content(content);
/// <summary> /// Sets the content of the request to the specified content. /// </summary> /// <param name="content">The HTTP content.</param> /// <returns>An <see cref="IRequest"/> object that represents the request.</returns> public static IRequest FormUrlEncoded(this IWith @this, FormUrlEncodedContent content) => @this.Content(content);
/// <summary> /// Sets the content of the request to the specified content. /// </summary> /// <param name="content">The HTTP content.</param> /// <returns>An <see cref="IRequest"/> object that represents the request.</returns> public static IRequest ByteArray(this IWith @this, ByteArrayContent content) => @this.Content(content);
/// <summary> /// Sets the content of the request to the specified content. /// </summary> /// <param name="content">The HTTP content.</param> /// <returns>An <see cref="IRequest"/> object that represents the request.</returns> public static IRequest Xml(this IWith @this, string content) => @this.Content(new StringContent(content, Encoding.UTF8, "application/xml"));
/// <summary> /// Sets the content of the request to the specified content with buffer size. /// </summary> /// <param name="content">The HTTP content.</param> /// <param name="bufferSize">The size, in bytes, of the buffer for the <paramref name="content"/>.</param> /// <returns>An <see cref="IRequest"/> object that represents the request.</returns> public static IRequest Stream(this IWith @this, Stream content, int bufferSize) => @this.Content(new StreamContent(content, bufferSize));
/// <summary> /// Sets the content of the request to the specified content. /// </summary> /// <param name="content">The HTTP content.</param> /// <returns>An <see cref="IRequest"/> object that represents the request.</returns> public static IRequest Stream(this IWith @this, Stream content) => @this.Content(new StreamContent(content));