Mono Class Library: System.Net.HttpWebRequest Overview | MembersSystem.Net.HttpWebRequest.BeginGetResponse Method |
Begins sending the current HTTP request asynchronously. [Edit]
|
- callback
- A AsyncCallback delegate to be called when the stream is available. Can be null . [Edit]
- state
- A object containing state information for the asynchronous request. Can be null . [Edit]
A IAsyncResult that contains information about the asynchronous operation. [Edit]
Type Reason InvalidOperationException HttpWebRequest.BeginGetResponse(AsyncCallback, object) or HttpWebRequest.GetResponse was previously called on this instance. [Edit] System.Net.ProtocolViolationException The HttpWebRequest.ContentLength property of the current instance has not been set. [Edit] System.Net.WebException HttpWebRequest.Abort was previously called. [Edit]
This method starts an asynchronous operation. To get the response, call the HttpWebRequest.EndGetResponse(IAsyncResult) method and specify the IAsyncResult object returned by this method.
Note: The HttpWebRequest.EndGetResponse(IAsyncResult) method should be called exactly once for each call to HttpWebRequest.BeginGetResponse(AsyncCallback, object).If the callback parameter is not null, the method referenced by callback is invoked when the asynchronous operation completes. The IAsyncResult object returned by this method is passed as the argument to the method referenced by callback.
The state parameter can be any object that the caller wishes to have available for the duration of the asynchronous operation. This object is available via the IAsyncResult.AsyncState property of the object returned by this method.
Note:[Edit]The method(s) invoked by the callback delegate can call the HttpWebRequest.EndGetResponse(IAsyncResult) method to retrieve the response.
This method is the asynchronous version of the HttpWebRequest.GetResponse method.
This method overrides WebRequest.BeginGetResponse(AsyncCallback, object).
Namespace: System.Net
Assembly: System (in System.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0