WebRequestExtensionsGetResponseAsync Method (WebRequest, Boolean, CancellationToken) |
Namespace: Rackspace.Threading
public static Task<WebResponse> GetResponseAsync( this WebRequest request, bool throwOnError, CancellationToken cancellationToken )
Exception | Condition |
---|---|
ArgumentNullException |
If request is . |
WebException |
If Abort was previously called. -or- If the timeout period for the request expired. -or- If an error occurred while processing the request. |
This operation will not block. The returned TaskTResult object will complete after a response to an Internet request is available.