TimeoutHandler Class
Defines timeout and cancellation support for HttpClient.
Namespace
Songhay.Net
Base Types
  • DelegatingHandler
graph BT Type-->Base0["DelegatingHandler"] Type["TimeoutHandler"] class Type type-node

Syntax

public class TimeoutHandler : DelegatingHandler

Remarks

📖 see “Better timeout handling with HttpClient” by @thomaslevesque [ https://github.com/thomaslevesque ] [ https://thomaslevesque.com/2018/02/25/better-timeout-handling-with-httpclient/ ]

Properties

Name Property Type Summary
DefaultTimeout TimeSpan
Gets or sets the default timeout.
static
RequestTimeout TimeSpan
Gets or sets the request timeout.

Methods

Name Return Value Summary
SendAsync(HttpRequestMessage, CancellationToken) Task<HttpResponseMessage>
Sends an HTTP request to the inner handler to send to the server as an asynchronous operation.

Extension Methods

Name Value Summary
IsAssignableToISerializable<TimeoutHandler>() bool
Determines whether the specified type can be assigned to System.Runtime.Serialization.ISerializable.
ToObjectOrDbNull<TimeoutHandler>() object
Boxes the nullable in object or returns DBNull.
ToReferenceTypeValueOrThrow<TimeoutHandler>(string) T
Returns the non-null value of the specified, nullable reference type or throws an ArgumentNullException when the value is null.

See Also

  • DelegatingHandler