MessageProcessingHandler.Send(HttpRequestMessage, CancellationToken) 方法

定义

将 HTTP 请求发送到内部处理程序,然后再发送到服务器。

protected public:
 override System::Net::Http::HttpResponseMessage ^ Send(System::Net::Http::HttpRequestMessage ^ request, System::Threading::CancellationToken cancellationToken);
protected internal override sealed System.Net.Http.HttpResponseMessage Send (System.Net.Http.HttpRequestMessage request, System.Threading.CancellationToken cancellationToken);
override this.Send : System.Net.Http.HttpRequestMessage * System.Threading.CancellationToken -> System.Net.Http.HttpResponseMessage
Protected Friend Overrides NotOverridable Function Send (request As HttpRequestMessage, cancellationToken As CancellationToken) As HttpResponseMessage

参数

request
HttpRequestMessage

要发送到服务器的 HTTP 请求消息。

cancellationToken
CancellationToken

可由其他对象或线程用以接收取消通知的取消标记。

返回

HTTP 响应消息。

例外

取消令牌已取消。 此异常存储在返回的任务中。

适用于