HttpContent.ReadAsStringAsync Metodo

Definizione

Serializzare il contenuto HTTP in una stringa come operazione asincrona.

public:
 System::Threading::Tasks::Task<System::String ^> ^ ReadAsStringAsync();
public System.Threading.Tasks.Task<string> ReadAsStringAsync();
member this.ReadAsStringAsync : unit -> System.Threading.Tasks.Task<string>
Public Function ReadAsStringAsync () As Task(Of String)

Valori restituiti

Oggetto attività che rappresenta l'operazione asincrona.

Commenti

Questa operazione non verrà bloccata. L'oggetto restituito Task<TResult> verrà completato dopo che tutto il contenuto è stato scritto come stringa.

Al termine dell'operazione, la Result proprietà nell'oggetto attività restituito contiene la stringa con il contenuto HTTP.

Si noti che questo metodo memorizza internamente nel buffer il contenuto tramite LoadIntoBufferAsync().

Si applica a