WebRequest.GetResponseAsync 方法

定義

在子代類別中覆寫時,傳回對網際網路要求的回應,做為非同步作業。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)

傳回

Task<WebResponse>

工作物件,表示非同步作業。The task object representing the asynchronous operation.

備註

這項作業不會封鎖。This operation will not block. 傳回的 Task<TResult> 物件會在網際網路要求的回應可用之後完成。The returned Task<TResult> object will complete after a response to an Internet request is available.

適用於