共用方式為


HttpStreamContent 類別

定義

提供使用資料流程的 HTTP 內容。

public ref class HttpStreamContent sealed : IClosable, IStringable, IHttpContent
/// [Windows.Foundation.Metadata.Activatable(Windows.Web.Http.IHttpStreamContentFactory, 65536, Windows.Foundation.UniversalApiContract)]
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class HttpStreamContent final : IClosable, IStringable, IHttpContent
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
/// [Windows.Foundation.Metadata.Activatable(Windows.Web.Http.IHttpStreamContentFactory, 65536, "Windows.Foundation.UniversalApiContract")]
class HttpStreamContent final : IClosable, IStringable, IHttpContent
[Windows.Foundation.Metadata.Activatable(typeof(Windows.Web.Http.IHttpStreamContentFactory), 65536, typeof(Windows.Foundation.UniversalApiContract))]
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class HttpStreamContent : System.IDisposable, IStringable, IHttpContent
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
[Windows.Foundation.Metadata.Activatable(typeof(Windows.Web.Http.IHttpStreamContentFactory), 65536, "Windows.Foundation.UniversalApiContract")]
public sealed class HttpStreamContent : System.IDisposable, IStringable, IHttpContent
function HttpStreamContent(content)
Public NotInheritable Class HttpStreamContent
Implements IDisposable, IHttpContent, IStringable
繼承
Object Platform::Object IInspectable HttpStreamContent
屬性
實作

Windows 需求

裝置系列
Windows 10 (已於 10.0.10240.0 引進)
API contract
Windows.Foundation.UniversalApiContract (已於 v1.0 引進)

建構函式

HttpStreamContent(IInputStream)

使用指定的內容,初始化 HttpStreamContent 類別的新實例。

屬性

Headers

取得 HttpStreamContent上設定的內容標頭集合。

方法

BufferAllAsync()

HttpStreamContent 序列化為非同步作業的記憶體。

Close()

關閉 HttpStreamContent 實例並釋放已配置的資源。

Dispose()

執行與釋放 (Free)、釋放 (Release) 或重設 Unmanaged 資源相關聯之應用程式定義的工作。

ReadAsBufferAsync()

HttpStreamContent 序列化為非同步作業的緩衝區。

ReadAsInputStreamAsync()

序列化 HttpStreamContent ,並傳回以非同步動作表示內容的輸入資料流程。

ReadAsStringAsync()

HttpStreamContent 序列化為非同步作業的 String

ToString()

傳回表示目前 HttpStreamContent 物件的字串。

TryComputeLength(UInt64)

判斷 HttpStreamContent 是否具有位元組的有效長度。

WriteToStreamAsync(IOutputStream)

HttpStreamContent 寫入輸出資料流程作為非同步作業。

適用於

另請參閱