Jaa


HttpStreamContent Class

Definition

Provides HTTP content that uses a stream.

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
Inheritance
Object Platform::Object IInspectable HttpStreamContent
Attributes
Implements

Windows requirements

Device family
Windows 10 (introduced in 10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v1.0)

Constructors

HttpStreamContent(IInputStream)

Initializes a new instance of the HttpStreamContent class with the specified content.

Properties

Headers

Get a collection of content headers set on the HttpStreamContent.

Methods

BufferAllAsync()

Serialize the HttpStreamContent into memory as an asynchronous operation.

Close()

Closes the HttpStreamContent instance and releases allocated resources.

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

ReadAsBufferAsync()

Serialize the HttpStreamContent to a buffer as an asynchronous operation.

ReadAsInputStreamAsync()

Serialize the HttpStreamContent and return an input stream that represents the content as an asynchronous operation.

ReadAsStringAsync()

Serialize the HttpStreamContent to a String as an asynchronous operation.

ToString()

Returns a string that represents the current HttpStreamContent object.

TryComputeLength(UInt64)

Determines whether the HttpStreamContent has a valid length in bytes.

WriteToStreamAsync(IOutputStream)

Write the HttpStreamContent to an output stream as an asynchronous operation.

Applies to

See also