WebRequest.GetResponseAsync WebRequest.GetResponseAsync WebRequest.GetResponseAsync WebRequest.GetResponseAsync Method

定义

当在子类中被重写时,将作为异步操作返回对 Internet 请求的响应。When overridden in a descendant class, returns a response to an Internet request as an asynchronous operation.

public:
 virtual System::Threading::Tasks::Task<System::Net::WebResponse ^> ^ GetResponseAsync();
public virtual System.Threading.Tasks.Task<System.Net.WebResponse> GetResponseAsync ();
abstract member GetResponseAsync : unit -> System.Threading.Tasks.Task<System.Net.WebResponse>
override this.GetResponseAsync : unit -> System.Threading.Tasks.Task<System.Net.WebResponse>
Public Overridable Function GetResponseAsync () As Task(Of WebResponse)

返回

表示异步操作的任务对象。The task object representing the asynchronous operation.

注解

此操作不会阻止。This operation will not block. 返回Task<TResult>的对象将在 Internet 请求的响应可用之后完成。The returned Task<TResult> object will complete after a response to an Internet request is available.

适用于