Class CpHttpHandler
Inheritance
CpHttpHandler
Assembly: CryptoPro.Net.Security.dll
Syntax
public class CpHttpHandler : DelegatingHandler, IDisposable
Constructors
CpHttpHandler()
Declaration
Properties
ActivityHeadersPropagator
Declaration
public DistributedContextPropagator? ActivityHeadersPropagator { get; set; }
Property Value
AllowAutoRedirect
Declaration
public bool AllowAutoRedirect { get; set; }
Property Value
AutomaticDecompression
Declaration
public DecompressionMethods AutomaticDecompression { get; set; }
Property Value
ConnectTimeout
Declaration
public TimeSpan ConnectTimeout { get; set; }
Property Value
CookieContainer
Declaration
public CookieContainer CookieContainer { get; set; }
Property Value
Credentials
Declaration
public ICredentials? Credentials { get; set; }
Property Value
DefaultProxyCredentials
Declaration
public ICredentials? DefaultProxyCredentials { get; set; }
Property Value
EnableMultipleHttp2Connections
Gets or sets a value that indicates whether additional HTTP/2 connections can be established to the same server
when the maximum of concurrent streams is reached on all existing connections.
Declaration
public bool EnableMultipleHttp2Connections { get; set; }
Property Value
Expect100ContinueTimeout
Declaration
public TimeSpan Expect100ContinueTimeout { get; set; }
Property Value
InitialHttp2StreamWindowSize
Defines the initial HTTP2 stream receive window size for all connections opened by the this SocketsHttpHandler.
Declaration
public int InitialHttp2StreamWindowSize { get; set; }
Property Value
Remarks
IsSupported
Gets a value that indicates whether the handler is supported on the current platform.
Declaration
public static bool IsSupported { get; }
Property Value
KeepAlivePingDelay
Gets or sets the keep alive ping delay. The client will send a keep alive ping to the server if it
doesn't receive any frames on a connection for this period of time. This property is used together with
KeepAlivePingTimeout to close broken connections.
Delay value must be greater than or equal to 1 second. Set to InfiniteTimeSpan to
disable the keep alive ping.
Defaults to InfiniteTimeSpan.
Declaration
public TimeSpan KeepAlivePingDelay { get; set; }
Property Value
KeepAlivePingPolicy
Gets or sets the keep alive ping behaviour. Keep alive pings are sent when a period of inactivity exceeds
the configured KeepAlivePingDelay value.
Declaration
public HttpKeepAlivePingPolicy KeepAlivePingPolicy { get; set; }
Property Value
KeepAlivePingTimeout
Gets or sets the keep alive ping timeout. Keep alive pings are sent when a period of inactivity exceeds
the configured KeepAlivePingDelay value. The client will close the connection if it
doesn't receive any frames within the timeout.
Timeout must be greater than or equal to 1 second. Set to InfiniteTimeSpan to
disable the keep alive ping timeout.
Defaults to 20 seconds.
Declaration
public TimeSpan KeepAlivePingTimeout { get; set; }
Property Value
MaxAutomaticRedirections
Declaration
public int MaxAutomaticRedirections { get; set; }
Property Value
MaxConnectionsPerServer
Declaration
public int MaxConnectionsPerServer { get; set; }
Property Value
MaxResponseDrainSize
Declaration
public int MaxResponseDrainSize { get; set; }
Property Value
MaxResponseHeadersLength
Declaration
public int MaxResponseHeadersLength { get; set; }
Property Value
PlaintextStreamFilter
Gets or sets a custom callback that provides access to the plaintext HTTP protocol stream.
Declaration
public Func<SocketsHttpPlaintextStreamFilterContext, CancellationToken, ValueTask<Stream>>? PlaintextStreamFilter { get; set; }
Property Value
PooledConnectionIdleTimeout
Declaration
public TimeSpan PooledConnectionIdleTimeout { get; set; }
Property Value
PooledConnectionLifetime
Declaration
public TimeSpan PooledConnectionLifetime { get; set; }
Property Value
PreAuthenticate
Declaration
public bool PreAuthenticate { get; set; }
Property Value
Properties
Declaration
public IDictionary<string, object?> Properties { get; }
Property Value
Proxy
Declaration
public IWebProxy? Proxy { get; set; }
Property Value
RequestHeaderEncodingSelector
Gets or sets a callback that returns the Encoding to encode the value for the specified request header name,
or null to use the default behavior.
Declaration
public HeaderEncodingSelector<HttpRequestMessage>? RequestHeaderEncodingSelector { get; set; }
Property Value
ResponseDrainTimeout
Declaration
public TimeSpan ResponseDrainTimeout { get; set; }
Property Value
ResponseHeaderEncodingSelector
Gets or sets a callback that returns the Encoding to decode the value for the specified response header name,
or null to use the default behavior.
Declaration
public HeaderEncodingSelector<HttpRequestMessage>? ResponseHeaderEncodingSelector { get; set; }
Property Value
SslOptions
Declaration
public CpSslClientAuthenticationOptions SslOptions { get; set; }
Property Value
UseCookies
Declaration
public bool UseCookies { get; set; }
Property Value
UseProxy
Declaration
public bool UseProxy { get; set; }
Property Value
Methods
Dispose(bool)
Releases the unmanaged resources used by the DelegatingHandler, and optionally disposes of the managed resources.
Declaration
protected override void Dispose(bool disposing)
Parameters
Type |
Name |
Description |
bool |
disposing |
true to release both managed and unmanaged resources; false to releases only unmanaged resources.
|
Overrides
Send(HttpRequestMessage, CancellationToken)
Sends an HTTP request to the inner handler to send to the server.
Declaration
protected override HttpResponseMessage Send(HttpRequestMessage request, CancellationToken cancellationToken)
Parameters
Returns
Overrides
SendAsync(HttpRequestMessage, CancellationToken)
Sends an HTTP request to the inner handler to send to the server as an asynchronous operation.
Declaration
protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
Parameters
Returns
Overrides
Exceptions
Implements