HttpRequestMessage.Content Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets or sets the contents of the HTTP message.
public:
property System::Net::Http::HttpContent ^ Content { System::Net::Http::HttpContent ^ get(); void set(System::Net::Http::HttpContent ^ value); };
public System.Net.Http.HttpContent Content { get; set; }
public System.Net.Http.HttpContent? Content { get; set; }
member this.Content : System.Net.Http.HttpContent with get, set
Public Property Content As HttpContent
Property Value
The content of a message.
Remarks
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.
ByteArrayContent - HTTP content based on a byte array.
FormUrlEncodedContent - HTTP content of name/value tuples encoded using application/x-www-form-urlencoded MIME type.
MultipartContent - HTTP content that gets serialized using the multipart/* content type specification.
MultipartFormDataContent - HTTP content encoded using the multipart/form-data MIME type.
StreamContent - HTTP content based on a stream.
StringContent - HTTP content based on a string.