Windows desktop applications
Collapse the table of content
Expand the table of content
Information
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.

HttpStringContent class

Provides HTTP content that uses a string.

Syntax


Public NotInheritable Class HttpStringContent
    Implements IHttpContent, _
    IDisposable, _
    IStringable

Members

The HttpStringContent class has these types of members:

Constructors

The HttpStringContent class has these constructors.

ConstructorDescription
HttpStringContent(String) Initializes a new instance of the HttpStringContent class with the specified content.
HttpStringContent(String, UnicodeEncoding) Initializes a new instance of the HttpStringContent class with the specified content and encoding.
HttpStringContent(String, UnicodeEncoding, String) Initializes a new instance of the HttpStringContent class with the specified content, encoding, and media type.

 

Methods

The HttpStringContent class has these methods. With C#, Visual Basic, and C++, it also inherits methods from the Object class.

MethodDescription
BufferAllAsync Serialize the HttpStringContent into memory as an asynchronous operation.
Close [C++, JavaScript]Closes the HttpStringContent instance and releases allocated resources.
Dispose [C#, VB]Performs tasks associated with freeing, releasing, or resetting unmanaged resources.
ReadAsBufferAsync Serialize the HttpStringContent to a buffer as an asynchronous operation.
ReadAsInputStreamAsync Serialize the HttpStringContent and return an input stream that represents the content as an asynchronous operation.
ReadAsStringAsync Serialize the HttpStringContent to a String as an asynchronous operation.
ToString Returns a string that represents the current HttpStringContent object.
TryComputeLength Compute the HttpStringContent length in bytes.
WriteToStreamAsync Write the HttpStringContent to an output stream as an asynchronous operation.

 

Properties

The HttpStringContent class has these properties.

PropertyAccess typeDescription

Headers

Read-only

Get a collection of content headers set on the HttpStringContent.

 

Requirements (Windows 10 device family)

Device family

Universal, introduced version 10.0.10240.0

API contract

Windows.Foundation.UniversalApiContract, introduced version 1.0

Namespace

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

Metadata

Windows.Foundation.UniversalApiContract.winmd

Requirements (Windows 8.x and Windows Phone 8.x)

Minimum supported client

Windows 8.1 [Windows Store apps, desktop apps]

Minimum supported server

Windows Server 2012 R2 [Windows Store apps, desktop apps]

Minimum supported phone

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

Namespace

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

Metadata

Windows.winmd

Attributes

[DualApiPartition()]
[MarshalingBehavior(Agile)]
[Threading(Both)]
[Version(0x06030000)]

See also

IClosable
IHttpContent
IStringable
Object

 

 

Show:
© 2016 Microsoft