添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

This browser is no longer supported.

Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.

Download Microsoft Edge More info about Internet Explorer and Microsoft Edge
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)

Returns

Remarks

This operation will not block. The returned Task<TResult> object will complete after all of the content has been written as a string.

Once the operation completes, the Result property on the returned task object contains the string with the HTTP content.

Note that this method will internally buffer the content via LoadIntoBufferAsync() .

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

Parameters

Remarks

This operation will not block. The returned Task<TResult> object will complete after all of the content has been written as a string.

Once the operation completes, the Result property on the returned task object contains the string with the HTTP content.

Note that this method will internally buffer the content via LoadIntoBufferAsync() .

Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see: https://aka.ms/ContentUserFeedback .

Submit and view feedback for

This product