IHttpContent Interface
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.
Provides a base interface for an HTTP entity body and content headers.
public interface class IHttpContent : IClosable
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.Guid(1796514881, 64423, 19410, 175, 10, 131, 157, 231, 194, 149, 218)]
struct IHttpContent : IClosable
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.Guid(1796514881, 64423, 19410, 175, 10, 131, 157, 231, 194, 149, 218)]
public interface IHttpContent : System.IDisposable
Public Interface IHttpContent
Implements IDisposable
- Derived
- Attributes
- Implements
Device family |
Windows 10 (introduced in 10.0.10240.0)
|
API contract |
Windows.Foundation.UniversalApiContract (introduced in v1.0)
|
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.
Headers |
Get a collection of content headers set on the IHttpContent. |
Buffer |
Serialize the HTTP content into memory as an asynchronous operation. |
Dispose() |
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. |
Read |
Serialize the HTTP content to a buffer as an asynchronous operation. |
Read |
Serialize the HTTP content and return an input stream that represents the content as an asynchronous operation. |
Read |
Serialize the HTTP content to a String as an asynchronous operation. |
Try |
Determines whether the HTTP content has a valid length in bytes. |
Write |
Write the HTTP content to an output stream as an asynchronous operation. |
Product | Versions |
---|---|
WinRT | Build 10240, Build 10586, Build 14383, Build 15063, Build 16299, Build 17134, Build 17763, Build 18362, Build 19041, Build 20348, Build 22000, Build 22621, Build 26100 |