The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

IHttpContent interface

Applies to Windows and Windows Phone

Provides a base interface for an HTTP entity body and content headers.


public interface IHttpContent : IDisposable, 




The IHttpContent interface has these types of members:


The IHttpContent interface has these methods. It also inherits methods from the Object class.

BufferAllAsync Serialize the HTTP content into memory as an asynchronous operation.
ReadAsBufferAsync Serialize the HTTP content to a buffer as an asynchronous operation.
ReadAsInputStreamAsync Serialize the HTTP content and return an input stream that represents the content as an asynchronous operation.
ReadAsStringAsync Serialize the HTTP content to a String as an asynchronous operation.
TryComputeLength Determines whether the HTTP content has a valid length in bytes.
WriteToStreamAsync Write the HTTP content to an output stream as an asynchronous operation.



The IHttpContent interface has these properties.

PropertyAccess typeDescription


Read-onlyGet a collection of content headers set on the IHttpContent.



The contents of an HTTP message corresponds to the entity body and headers associated with the content defined in RFC 2616. Several classes and an interface in the Windows.Web.Http namespace can be used for HTTP content, including:

  • IHttpContent - A base interface for developers to create their own content objects. It represents an HTTP entity body and content headers. This interface has methods that get and set the actual content data. It also provides properties that get and set content related headers.
  • HttpBufferContent - HTTP content that uses a buffer.
  • HttpFormUrlEncodedContent - HTTP content that uses name/value tuples encoded with the application/x-www-form-urlencoded MIME type.
  • HttpMultipartContent - HTTP content that uses multipart/* MIME type.
  • HttpMultipartFormDataContent - HTTP content that uses the encoded multipart/form-data MIME type.
  • HttpStreamContent - HTTP content that uses a stream. This content type is used by the HTTP methods to receive data and HTTP methods to upload data.
  • HttpStringContent - HTTP content that uses a string.


Minimum supported client

Windows 8.1

Minimum supported server

Windows Server 2012 R2

Minimum supported phone

Windows Phone 8.1 [Windows Phone Silverlight 8.1 and Windows Runtime apps]


Windows::Web::Http [C++]



See also




© 2014 Microsoft