HttpContent.ReadAsStringAsync 方法

定義

以非同步作業方式將 HTTP 內容序列化為字串。Serialize the HTTP content to a string as an asynchronous operation.

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)

傳回

工作物件,表示非同步作業。The task object representing the asynchronous operation.

備註

這項作業不會封鎖。This operation will not block. 傳回Task<TResult>的物件會在所有內容都寫成字串之後完成。The returned Task<TResult> object will complete after all of the content has been written as a string.

作業完成後,傳回之Result工作物件上的屬性會包含含有 HTTP 內容的字串。Once the operation completes, the Result property on the returned task object contains the string with the HTTP content.

適用於