Lingua

HttpStringContent Classe

Definizione

Fornisce contenuto HTTP che usa una stringa.

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
Ereditarietà
Object Platform::Object IInspectable HttpStringContent
Attributi
Implementazioni

Requisiti Windows

Requisiti Descrizione
Famiglia di dispositivi
Windows 10 (è stato introdotto in 10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (è stato introdotto in v1.0)

Costruttori

Nome Descrizione
HttpStringContent(String)

Inizializza una nuova istanza della classe HttpStringContent con il contenuto specificato.

HttpStringContent(String, UnicodeEncoding)

Inizializza una nuova istanza della classe HttpStringContent con il contenuto e la codifica specificati.

HttpStringContent(String, UnicodeEncoding, String)

Inizializza una nuova istanza della classe HttpStringContent con il contenuto, la codifica e il tipo di supporto specificati.

Proprietà

Nome Descrizione
Headers

Ottenere una raccolta di intestazioni di contenuto impostate in HttpStringContent.

Metodi

Nome Descrizione
BufferAllAsync()

Serializzare HttpStringContent in memoria come operazione asincrona.

Close()

Chiude l'istanza di HttpStringContent e rilascia le risorse allocate.

Dispose()

Esegue attività definite dall'applicazione, come rilasciare o reimpostare risorse non gestite.

ReadAsBufferAsync()

Serializzare HttpStringContent in un buffer come operazione asincrona.

ReadAsInputStreamAsync()

Serializzare HttpStringContent e restituire un flusso di input che rappresenta il contenuto come operazione asincrona.

ReadAsStringAsync()

Serializzare HttpStringContent in un'operazione asincrona.

ToString()

Restituisce una stringa che rappresenta l'oggetto HttpStringContent corrente.

TryComputeLength(UInt64)

Calcolare la lunghezza HttpStringContent in byte.

WriteToStreamAsync(IOutputStream)

Scrivere HttpStringContent in un flusso di output come operazione asincrona.

Si applica a

Vedi anche