コード例 #1
0
 /// <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);
コード例 #2
0
 /// <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);
コード例 #3
0
 /// <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);
コード例 #4
0
 /// <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"));
コード例 #5
0
 /// <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));
コード例 #6
0
 /// <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));