Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ Send()

override HttpResponseMessage System.Net.Http.SocketsHttpHandler.Send ( HttpRequestMessage request,
CancellationToken cancellationToken )
inlinepackagevirtual

Reimplemented from System.Net.Http.HttpMessageHandler.

Definition at line 511 of file SocketsHttpHandler.cs.

512 {
513 if (request == null)
514 {
515 throw new ArgumentNullException("request", System.SR.net_http_handler_norequest);
516 }
517 if (request.Version.Major >= 2)
518 {
519 throw new NotSupportedException(System.SR.Format(System.SR.net_http_http2_sync_not_supported, GetType()));
520 }
521 if (request.VersionPolicy == HttpVersionPolicy.RequestVersionOrHigher)
522 {
523 throw new NotSupportedException(System.SR.Format(System.SR.net_http_upgrade_not_enabled_sync, "Send", request.VersionPolicy));
524 }
526 cancellationToken.ThrowIfCancellationRequested();
527 HttpMessageHandlerStage httpMessageHandlerStage = _handler ?? SetupHandlerChain();
529 if (ex != null)
530 {
531 throw ex;
532 }
534 }
Exception ValidateAndNormalizeRequest(HttpRequestMessage request)
HttpMessageHandlerStage SetupHandlerChain()
static string net_http_http2_sync_not_supported
Definition SR.cs:196
static string Format(string resourceFormat, object p1)
Definition SR.cs:118
static string net_http_upgrade_not_enabled_sync
Definition SR.cs:198
static string net_http_handler_norequest
Definition SR.cs:70
Definition SR.cs:7

References System.Net.Http.SocketsHttpHandler._handler, System.cancellationToken, System.Net.Http.SocketsHttpHandler.CheckDisposed(), System.SR.Format(), System.SR.net_http_handler_norequest, System.SR.net_http_http2_sync_not_supported, System.SR.net_http_upgrade_not_enabled_sync, System.Net.Http.SocketsHttpHandler.SetupHandlerChain(), and System.Net.Http.SocketsHttpHandler.ValidateAndNormalizeRequest().