HttpClientHandler.Send(HttpRequestMessage, CancellationToken) メソッド
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
HttpResponseMessageで提供される情報に基づいて、HttpRequestMessageのインスタンスを作成します。
protected public:
override System::Net::Http::HttpResponseMessage ^ Send(System::Net::Http::HttpRequestMessage ^ request, System::Threading::CancellationToken cancellationToken);
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
protected internal override System.Net.Http.HttpResponseMessage Send(System.Net.Http.HttpRequestMessage request, System.Threading.CancellationToken cancellationToken);
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
[System.Runtime.Versioning.UnsupportedOSPlatform("android")]
[System.Runtime.Versioning.UnsupportedOSPlatform("ios")]
[System.Runtime.Versioning.UnsupportedOSPlatform("tvos")]
protected internal override System.Net.Http.HttpResponseMessage Send(System.Net.Http.HttpRequestMessage request, System.Threading.CancellationToken cancellationToken);
protected internal override System.Net.Http.HttpResponseMessage Send(System.Net.Http.HttpRequestMessage request, System.Threading.CancellationToken cancellationToken);
[<System.Runtime.Versioning.UnsupportedOSPlatform("browser")>]
override this.Send : System.Net.Http.HttpRequestMessage * System.Threading.CancellationToken -> System.Net.Http.HttpResponseMessage
[<System.Runtime.Versioning.UnsupportedOSPlatform("browser")>]
[<System.Runtime.Versioning.UnsupportedOSPlatform("android")>]
[<System.Runtime.Versioning.UnsupportedOSPlatform("ios")>]
[<System.Runtime.Versioning.UnsupportedOSPlatform("tvos")>]
override this.Send : System.Net.Http.HttpRequestMessage * System.Threading.CancellationToken -> System.Net.Http.HttpResponseMessage
override this.Send : System.Net.Http.HttpRequestMessage * System.Threading.CancellationToken -> System.Net.Http.HttpResponseMessage
Protected Friend Overrides Function Send (request As HttpRequestMessage, cancellationToken As CancellationToken) As HttpResponseMessage
パラメーター
- request
- HttpRequestMessage
HTTP 要求メッセージ。
- cancellationToken
- CancellationToken
操作を取り消すキャンセル トークン。
返品
HTTP 応答メッセージ。
- 属性
例外
requestはnullされました。
HTTP/2 以降の場合、またはバージョンのアップグレードを要求する場合は、 RequestVersionOrHigherによって有効になります。
-又は-
HttpContentから派生したカスタム クラスを使用する場合は、SerializeToStream(Stream, TransportContext, CancellationToken)メソッドをオーバーライドしません。
-又は-
カスタム HttpMessageHandler を使用している場合は、 Send(HttpRequestMessage, CancellationToken) メソッドをオーバーライドしません。
要求は取り消されました。
-又は-
OperationCanceledException例外がTimeoutExceptionを入れ子にした場合: タイムアウトのために要求が失敗しました。
この例外は、返されたタスクに格納されます。