HttpStringContent HttpStringContent HttpStringContent HttpStringContent HttpStringContent Class

Definition

Provides HTTP content that uses a string.

public : sealed class HttpStringContent : IClosable, IStringable, IHttpContent
struct winrt::Windows::Web::Http::HttpStringContent : IClosable, IStringable, IHttpContent
public sealed class HttpStringContent : IDisposable, IStringable, IHttpContent
Public NotInheritable Class HttpStringContent Implements IDisposable, IStringable, IHttpContent
var httpStringContent = new httpStringContent(content);
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Constructors

HttpStringContent(String) HttpStringContent(String) HttpStringContent(String) HttpStringContent(String) HttpStringContent(String)

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

HttpStringContent(String, UnicodeEncoding) HttpStringContent(String, UnicodeEncoding) HttpStringContent(String, UnicodeEncoding) HttpStringContent(String, UnicodeEncoding) HttpStringContent(String, UnicodeEncoding)

Initializes a new instance of the HttpStringContent class with the specified content and encoding.

HttpStringContent(String, UnicodeEncoding, String) HttpStringContent(String, UnicodeEncoding, String) HttpStringContent(String, UnicodeEncoding, String) HttpStringContent(String, UnicodeEncoding, String) HttpStringContent(String, UnicodeEncoding, String)

Initializes a new instance of the HttpStringContent class with the specified content, encoding, and media type.

Properties

Headers Headers Headers Headers Headers

Get a collection of content headers set on the HttpStringContent.

Methods

BufferAllAsync() BufferAllAsync() BufferAllAsync() BufferAllAsync() BufferAllAsync()

Serialize the HttpStringContent into memory as an asynchronous operation.

Close() Close() Close() Close() Close()

Closes the HttpStringContent instance and releases allocated resources.

Dispose() Dispose() Dispose() Dispose() Dispose()

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

ReadAsBufferAsync() ReadAsBufferAsync() ReadAsBufferAsync() ReadAsBufferAsync() ReadAsBufferAsync()

Serialize the HttpStringContent to a buffer as an asynchronous operation.

ReadAsInputStreamAsync() ReadAsInputStreamAsync() ReadAsInputStreamAsync() ReadAsInputStreamAsync() ReadAsInputStreamAsync()

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

ReadAsStringAsync() ReadAsStringAsync() ReadAsStringAsync() ReadAsStringAsync() ReadAsStringAsync()

Serialize the HttpStringContent to a String as an asynchronous operation.

ToString() ToString() ToString() ToString() ToString()

Returns a string that represents the current HttpStringContent object.

TryComputeLength(UInt64) TryComputeLength(UInt64) TryComputeLength(UInt64) TryComputeLength(UInt64) TryComputeLength(UInt64)

Compute the HttpStringContent length in bytes.

WriteToStreamAsync(IOutputStream) WriteToStreamAsync(IOutputStream) WriteToStreamAsync(IOutputStream) WriteToStreamAsync(IOutputStream) WriteToStreamAsync(IOutputStream)

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

See Also