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()
.