HttpResponseMessage.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 content of the HTTP response message on the HttpResponseMessage object.
public:
property IHttpContent ^ Content { IHttpContent ^ get(); void set(IHttpContent ^ value); };
IHttpContent Content();
void Content(IHttpContent value);
public IHttpContent Content { get; set; }
var iHttpContent = httpResponseMessage.content;
httpResponseMessage.content = iHttpContent;
Public Property Content As IHttpContent
Property Value
The content of the HTTP response message on the HttpResponseMessage object.
Remarks
The content of an HTTP response message corresponds to the entity body defined in RFC 2616.
A number of classes and an interface can be used for HTTP content. These include the following.
- IHttpContent - a base interface representing an HTTP entity body and content headers.
- HttpBufferContent - HTTP content based on a stream.
- HttpFormUrlEncodedContent - HTTP content based on name/value data encoded using application/x-www-form-urlencoded MIME type.
- HttpStreamContent - HTTP content based on a stream.
- HttpStringContent - HTTP content based on a string.