Export (0) Print
Expand All

HttpRequestMessage.Content Property

.NET Framework 4.5

Gets or sets the contents of the HTTP message.

Namespace:  System.Net.Http
Assembly:  System.Net.Http (in System.Net.Http.dll)

public HttpContent Content { get; set; }

Property Value

Type: System.Net.Http.HttpContent
Returns HttpContent.
The content of a message

The contents of an HTTP message corresponds to the entity body defined in RFC 2616.

A number of classes can be used for HTTP content. These include the following.

  1. ByteArrayContent - HTTP content based on a byte array.

  2. FormUrlEncodedContent - HTTP content of name/value tuples encoded using application/x-www-form-urlencoded MIME type.

  3. MultipartContent - HTTP content that gets serialized using the multipart/* content type specification.

  4. MultipartFormDataContent - HTTP content encoded using the multipart/form-data MIME type.

  5. StreamContent - HTTP content based on a stream.

  6. StringContent - HTTP content based on a string.

.NET Framework

Supported in: 4.6, 4.5

Supported in: Windows Phone 8.1
© 2015 Microsoft