Mono Class Library: System.Net.HttpWebRequest Overview | MembersSystem.Net.HttpWebRequest.Abort Method |
Cancels an asynchronous operation. [Edit]
|
HttpWebRequest.Abort cancels any pending asynchronous operation. After this method is called, calling HttpWebRequest.GetResponse, HttpWebRequest.BeginGetResponse(AsyncCallback, object), HttpWebRequest.EndGetResponse(IAsyncResult), HttpWebRequest.GetRequestStream, HttpWebRequest.BeginGetRequestStream(AsyncCallback, object), or HttpWebRequest.EndGetRequestStream(IAsyncResult) will throw a System.Net.WebException with WebException.Status set to WebExceptionStatus.RequestCanceled .
Note:[Edit]If no pending request exists, calling this method does not cause an exception to be thrown.
This method overrides WebRequest.Abort.
Namespace: System.Net
Assembly: System (in System.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0