public:
System::Threading::Tasks::Task<System::Net::Http::HttpResponseMessage ^> ^ GetAsync(System::String ^ requestUri);
public System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage> GetAsync (string requestUri);
public System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage> GetAsync (string? requestUri);
member this.GetAsync : string -> System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage>
Public Function GetAsync (requestUri As String) As Task(Of HttpResponseMessage)
HttpRequestException
在所有适用的 .NET Framework 版本上引发。
TaskCanceledException
不会在所有适用的 .NET Core 版本上引发任何内部异常。
TaskCanceledException
在 .NET 5 及更高版本上引发嵌套
TimeoutException
的 。
public:
System::Threading::Tasks::Task<System::Net::Http::HttpResponseMessage ^> ^ GetAsync(Uri ^ requestUri);
public System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage> GetAsync (Uri requestUri);
public System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage> GetAsync (Uri? requestUri);
member this.GetAsync : Uri -> System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage>
Public Function GetAsync (requestUri As Uri) As Task(Of HttpResponseMessage)
HttpRequestException
在所有适用的 .NET Framework 版本上引发。
TaskCanceledException
不会在所有适用的 .NET Core 版本上引发任何内部异常。
TaskCanceledException
在 .NET 5 及更高版本上引发嵌套
TimeoutException
的 。
public:
System::Threading::Tasks::Task<System::Net::Http::HttpResponseMessage ^> ^ GetAsync(System::String ^ requestUri, System::Net::Http::HttpCompletionOption completionOption);
public System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage> GetAsync (string requestUri, System.Net.Http.HttpCompletionOption completionOption);
public System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage> GetAsync (string? requestUri, System.Net.Http.HttpCompletionOption completionOption);
member this.GetAsync : string * System.Net.Http.HttpCompletionOption -> System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage>
Public Function GetAsync (requestUri As String, completionOption As HttpCompletionOption) As Task(Of HttpResponseMessage)
HttpRequestException
在所有适用的 .NET Framework 版本上引发。
TaskCanceledException
不会在所有适用的 .NET Core 版本上引发任何内部异常。
TaskCanceledException
在 .NET 5 及更高版本上引发嵌套
TimeoutException
的 。
public:
System::Threading::Tasks::Task<System::Net::Http::HttpResponseMessage ^> ^ GetAsync(System::String ^ requestUri, System::Threading::CancellationToken cancellationToken);
public System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage> GetAsync (string requestUri, System.Threading.CancellationToken cancellationToken);
public System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage> GetAsync (string? requestUri, System.Threading.CancellationToken cancellationToken);
member this.GetAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage>
Public Function GetAsync (requestUri As String, cancellationToken As CancellationToken) As Task(Of HttpResponseMessage)
HttpRequestException
在所有适用的 .NET Framework 版本上引发。
TaskCanceledException
不会在所有适用的 .NET Core 版本上引发任何内部异常。
TaskCanceledException
在 .NET 5 及更高版本上引发嵌套
TimeoutException
的 。
public:
System::Threading::Tasks::Task<System::Net::Http::HttpResponseMessage ^> ^ GetAsync(Uri ^ requestUri, System::Net::Http::HttpCompletionOption completionOption);
public System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage> GetAsync (Uri requestUri, System.Net.Http.HttpCompletionOption completionOption);
public System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage> GetAsync (Uri? requestUri, System.Net.Http.HttpCompletionOption completionOption);
member this.GetAsync : Uri * System.Net.Http.HttpCompletionOption -> System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage>
Public Function GetAsync (requestUri As Uri, completionOption As HttpCompletionOption) As Task(Of HttpResponseMessage)
HttpRequestException
在所有适用的 .NET Framework 版本上引发。
TaskCanceledException
不会在所有适用的 .NET Core 版本上引发任何内部异常。
TaskCanceledException
在 .NET 5 及更高版本上引发嵌套
TimeoutException
的 。
public:
System::Threading::Tasks::Task<System::Net::Http::HttpResponseMessage ^> ^ GetAsync(Uri ^ requestUri, System::Threading::CancellationToken cancellationToken);
public System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage> GetAsync (Uri requestUri, System.Threading.CancellationToken cancellationToken);
public System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage> GetAsync (Uri? requestUri, System.Threading.CancellationToken cancellationToken);
member this.GetAsync : Uri * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage>
Public Function GetAsync (requestUri As Uri, cancellationToken As CancellationToken) As Task(Of HttpResponseMessage)
HttpRequestException
在所有适用的 .NET Framework 版本上引发。
TaskCanceledException
不会在所有适用的 .NET Core 版本上引发任何内部异常。
TaskCanceledException
在 .NET 5 及更高版本上引发嵌套
TimeoutException
的 。
public:
System::Threading::Tasks::Task<System::Net::Http::HttpResponseMessage ^> ^ GetAsync(System::String ^ requestUri, System::Net::Http::HttpCompletionOption completionOption, System::Threading::CancellationToken cancellationToken);
public System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage> GetAsync (string requestUri, System.Net.Http.HttpCompletionOption completionOption, System.Threading.CancellationToken cancellationToken);
public System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage> GetAsync (string? requestUri, System.Net.Http.HttpCompletionOption completionOption, System.Threading.CancellationToken cancellationToken);
member this.GetAsync : string * System.Net.Http.HttpCompletionOption * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage>
Public Function GetAsync (requestUri As String, completionOption As HttpCompletionOption, cancellationToken As CancellationToken) As Task(Of HttpResponseMessage)
HttpRequestException
在所有适用的 .NET Framework 版本上引发。
TaskCanceledException
不会在所有适用的 .NET Core 版本上引发任何内部异常。
TaskCanceledException
在 .NET 5 及更高版本上引发嵌套
TimeoutException
的 。
public:
System::Threading::Tasks::Task<System::Net::Http::HttpResponseMessage ^> ^ GetAsync(Uri ^ requestUri, System::Net::Http::HttpCompletionOption completionOption, System::Threading::CancellationToken cancellationToken);
public System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage> GetAsync (Uri requestUri, System.Net.Http.HttpCompletionOption completionOption, System.Threading.CancellationToken cancellationToken);
public System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage> GetAsync (Uri? requestUri, System.Net.Http.HttpCompletionOption completionOption, System.Threading.CancellationToken cancellationToken);
member this.GetAsync : Uri * System.Net.Http.HttpCompletionOption * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage>
Public Function GetAsync (requestUri As Uri, completionOption As HttpCompletionOption, cancellationToken As CancellationToken) As Task(Of HttpResponseMessage)
HttpRequestException
在所有适用的 .NET Framework 版本上引发。
TaskCanceledException
不会在所有适用的 .NET Core 版本上引发任何内部异常。
TaskCanceledException
在 .NET 5 及更高版本上引发嵌套
TimeoutException
的 。