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