class

Telegram::HTTPClientConfig

Inherits Reference < Object

Configuration class for HTTP client settings

Constructors

Class methods

development

Create a configuration optimized for development/testing

Source
production

Create a configuration optimized for production bots

Source

Instance methods

add_header(name : String, value : String)

Add default header

Source
connect_timeout

Connection settings

Source
connect_timeout=(connect_timeout : Time::Span)

Connection settings

Source
default_headers

Headers

Source
default_headers=(default_headers : HTTP::Headers)

Headers

Source
keep_alive_timeout
Source
keep_alive_timeout=(keep_alive_timeout : Time::Span)
Source
log_level
Source
log_level=(log_level : Log::Severity)
Source
log_requests
Source
log_requests=(log_requests : Bool)
Source
log_responses
Source
log_responses=(log_responses : Bool)
Source
logger

Logging

Source
logger=(logger : Log)

Logging

Source
max_connections_per_host

Pool settings

Source
max_connections_per_host=(max_connections_per_host : Int32)

Pool settings

Source
max_retries

Retry settings

Source
max_retries=(max_retries : Int32)

Retry settings

Source
pool_timeout
Source
pool_timeout=(pool_timeout : Time::Span)
Source
proxy(host : String, port : Int32, user : String | Nil = nil, password : String | Nil = nil)

Configure proxy settings

Source
proxy_host

Proxy settings

Source
proxy_host=(proxy_host : String | Nil)

Proxy settings

Source
proxy_password
Source
proxy_password=(proxy_password : String | Nil)
Source
proxy_port
Source
proxy_port=(proxy_port : Int32 | Nil)
Source
proxy_user
Source
proxy_user=(proxy_user : String | Nil)
Source
read_timeout
Source
read_timeout=(read_timeout : Time::Span)
Source
retry_backoff_multiplier
Source
retry_backoff_multiplier=(retry_backoff_multiplier : Float64)
Source
retry_delay
Source
retry_delay=(retry_delay : Time::Span)
Source
retry_jitter
Source
retry_jitter=(retry_jitter : Float64)
Source
ssl(verify : Bool = true, context : OpenSSL::SSL::Context::Client | Nil = nil)

Configure SSL/TLS

Source
ssl_context
Source
ssl_context=(ssl_context : OpenSSL::SSL::Context::Client | Nil)
Source
user_agent

User agent

Source
user_agent=(user_agent : String)

User agent

Source
verify_ssl

SSL/TLS settings

Source
verify_ssl=(verify_ssl : Bool)

SSL/TLS settings

Source