КриптоПро .NET
Search Results for

    Показать/Скрыть содержание

    Class CpHttpHandler

    A message handler based on SocketsHttpHandler supporting GOST TLS algorithms.

    Inheritance
    object
    HttpMessageHandler
    DelegatingHandler
    CpHttpHandler
    Implements
    IDisposable
    Inherited Members
    DelegatingHandler.InnerHandler
    HttpMessageHandler.Dispose()
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: CryptoPro.Net.Http
    Assembly: CryptoPro.Net.Security.dll
    Syntax
    public class CpHttpHandler : DelegatingHandler, IDisposable

    Constructors

    CpHttpHandler()

    Initializes a new instance of CpHttpHandler class.

    Declaration
    public CpHttpHandler()

    Properties

    ActivityHeadersPropagator

    Gets or sets the DistributedContextPropagator to use when propagating the distributed trace and context. Use null to disable propagation. Defaults to Current.

    Declaration
    public DistributedContextPropagator? ActivityHeadersPropagator { get; set; }
    Property Value
    Type Description
    DistributedContextPropagator

    AllowAutoRedirect

    Declaration
    public bool AllowAutoRedirect { get; set; }
    Property Value
    Type Description
    bool

    AutomaticDecompression

    Declaration
    public DecompressionMethods AutomaticDecompression { get; set; }
    Property Value
    Type Description
    DecompressionMethods

    ConnectTimeout

    Declaration
    public TimeSpan ConnectTimeout { get; set; }
    Property Value
    Type Description
    TimeSpan

    CookieContainer

    Declaration
    public CookieContainer CookieContainer { get; set; }
    Property Value
    Type Description
    CookieContainer

    Credentials

    Declaration
    public ICredentials? Credentials { get; set; }
    Property Value
    Type Description
    ICredentials

    DefaultProxyCredentials

    Declaration
    public ICredentials? DefaultProxyCredentials { get; set; }
    Property Value
    Type Description
    ICredentials

    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
    Type Description
    bool

    Expect100ContinueTimeout

    Declaration
    public TimeSpan Expect100ContinueTimeout { get; set; }
    Property Value
    Type Description
    TimeSpan

    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
    Type Description
    int
    Remarks

    Larger the values may lead to faster download speed, but potentially higher memory footprint. The property must be set to a value between 65535 and the configured maximum window size, which is 16777216 by default.

    IsSupported

    Gets a value that indicates whether the handler is supported on the current platform.

    Declaration
    public static bool IsSupported { get; }
    Property Value
    Type Description
    bool

    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
    Type Description
    TimeSpan

    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
    Type Description
    HttpKeepAlivePingPolicy

    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
    Type Description
    TimeSpan

    MaxAutomaticRedirections

    Declaration
    public int MaxAutomaticRedirections { get; set; }
    Property Value
    Type Description
    int

    MaxConnectionsPerServer

    Declaration
    public int MaxConnectionsPerServer { get; set; }
    Property Value
    Type Description
    int

    MaxResponseDrainSize

    Declaration
    public int MaxResponseDrainSize { get; set; }
    Property Value
    Type Description
    int

    MaxResponseHeadersLength

    Declaration
    public int MaxResponseHeadersLength { get; set; }
    Property Value
    Type Description
    int

    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
    Type Description
    Func<SocketsHttpPlaintextStreamFilterContext, CancellationToken, ValueTask<Stream>>

    PooledConnectionIdleTimeout

    Declaration
    public TimeSpan PooledConnectionIdleTimeout { get; set; }
    Property Value
    Type Description
    TimeSpan

    PooledConnectionLifetime

    Declaration
    public TimeSpan PooledConnectionLifetime { get; set; }
    Property Value
    Type Description
    TimeSpan

    PreAuthenticate

    Declaration
    public bool PreAuthenticate { get; set; }
    Property Value
    Type Description
    bool

    Properties

    Declaration
    public IDictionary<string, object?> Properties { get; }
    Property Value
    Type Description
    IDictionary<string, object>

    Proxy

    Declaration
    public IWebProxy? Proxy { get; set; }
    Property Value
    Type Description
    IWebProxy

    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
    Type Description
    HeaderEncodingSelector<HttpRequestMessage>

    ResponseDrainTimeout

    Declaration
    public TimeSpan ResponseDrainTimeout { get; set; }
    Property Value
    Type Description
    TimeSpan

    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
    Type Description
    HeaderEncodingSelector<HttpRequestMessage>

    SslOptions

    Declaration
    public CpSslClientAuthenticationOptions SslOptions { get; set; }
    Property Value
    Type Description
    CpSslClientAuthenticationOptions

    UseCookies

    Declaration
    public bool UseCookies { get; set; }
    Property Value
    Type Description
    bool

    UseProxy

    Declaration
    public bool UseProxy { get; set; }
    Property Value
    Type Description
    bool

    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
    DelegatingHandler.Dispose(bool)

    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
    Type Name Description
    HttpRequestMessage request

    The HTTP request message to send to the server.

    CancellationToken cancellationToken

    A cancellation token to cancel operation.

    Returns
    Type Description
    HttpResponseMessage

    An HTTP response message.

    Overrides
    DelegatingHandler.Send(HttpRequestMessage, CancellationToken)

    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
    Type Name Description
    HttpRequestMessage request

    The HTTP request message to send to the server.

    CancellationToken cancellationToken

    A cancellation token to cancel operation.

    Returns
    Type Description
    Task<HttpResponseMessage>

    The task object representing the asynchronous operation.

    Overrides
    DelegatingHandler.SendAsync(HttpRequestMessage, CancellationToken)
    Exceptions
    Type Condition
    ArgumentNullException

    The request was null.

    Implements

    IDisposable
    В этом разделе
    Наверх Generated by DocFX