HttpStringContent Klasse

Definition

Stellt HTTP-Inhalt bereit, der eine Zeichenfolge verwendet.

public ref class HttpStringContent sealed : IClosable, IStringable, IHttpContent
/// [Windows.Foundation.Metadata.Activatable(Windows.Web.Http.IHttpStringContentFactory, 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 HttpStringContent 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.IHttpStringContentFactory, 65536, "Windows.Foundation.UniversalApiContract")]
class HttpStringContent final : IClosable, IStringable, IHttpContent
[Windows.Foundation.Metadata.Activatable(typeof(Windows.Web.Http.IHttpStringContentFactory), 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 HttpStringContent : 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.IHttpStringContentFactory), 65536, "Windows.Foundation.UniversalApiContract")]
public sealed class HttpStringContent : System.IDisposable, IStringable, IHttpContent
function HttpStringContent(content, encoding, mediaType)
Public NotInheritable Class HttpStringContent
Implements IDisposable, IHttpContent, IStringable
Vererbung
Object Platform::Object IInspectable HttpStringContent
Attribute
Implementiert

Windows-Anforderungen

Gerätefamilie
Windows 10 (eingeführt in 10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (eingeführt in v1.0)

Konstruktoren

HttpStringContent(String)

Initialisiert eine neue instance der HttpStringContent-Klasse mit dem angegebenen Inhalt.

HttpStringContent(String, UnicodeEncoding)

Initialisiert eine neue instance der HttpStringContent-Klasse mit dem angegebenen Inhalt und der angegebenen Codierung.

HttpStringContent(String, UnicodeEncoding, String)

Initialisiert eine neue instance der HttpStringContent-Klasse mit dem angegebenen Inhalt, der angegebenen Codierung und dem angegebenen Medientyp.

Eigenschaften

Headers

Rufen Sie eine Auflistung von Inhaltsheadern ab, die für HttpStringContent festgelegt sind.

Methoden

BufferAllAsync()

Serialisieren Sie httpStringContent als asynchronen Vorgang in den Arbeitsspeicher.

Close()

Schließt die httpStringContent-instance und gibt zugeordnete Ressourcen frei.

Dispose()

Führt anwendungsspezifische Aufgaben durch, die mit der Freigabe, der Zurückgabe oder dem Zurücksetzen von nicht verwalteten Ressourcen zusammenhängen.

ReadAsBufferAsync()

Serialisieren Sie httpStringContent als asynchronen Vorgang in einen Puffer.

ReadAsInputStreamAsync()

Serialisieren Sie httpStringContent , und geben Sie einen Eingabedatenstrom zurück, der den Inhalt als asynchronen Vorgang darstellt.

ReadAsStringAsync()

Serialisieren Sie httpStringContent als asynchronen Vorgang in eine Zeichenfolge .

ToString()

Gibt eine Zeichenfolge zurück, die das aktuelle HttpStringContent-Objekt darstellt.

TryComputeLength(UInt64)

Berechnen Sie die Länge von HttpStringContent in Bytes.

WriteToStreamAsync(IOutputStream)

Schreiben Sie httpStringContent als asynchronen Vorgang in einen Ausgabedatenstrom.

Gilt für:

Weitere Informationen