Returns the WebResponse for the specified WebRequest using the specified IAsyncResult.
| C# | Visual Basic |
protected virtual WebResponse GetWebResponse( WebRequest request, IAsyncResult result )
Protected Overridable Function GetWebResponse ( _ request As WebRequest, _ result As IAsyncResult _ ) As WebResponse
- request (WebRequest)
- A WebRequest that is used to obtain the response.
- result (IAsyncResult)
- An IAsyncResult object obtained from a previous call to BeginGetResponse(AsyncCallback, Object).
A WebResponse containing the response for the specified WebRequest.
The following code example shows an implementation of this method that can be customized by a class derived from WebClient.
CopyC#
protected override WebResponse GetWebResponse (WebRequest request, IAsyncResult result) { WebResponse response = base.GetWebResponse (request, result); // Perform any custom actions with the response ... return response; }