1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214
|
module HTTPX
class Options
# include _ToHash
BUFFER_SIZE: Integer
WINDOW_SIZE: Integer
MAX_BODY_THRESHOLD_SIZE: Integer
CONNECT_TIMEOUT: Integer
READ_TIMEOUT: Integer
WRITE_TIMEOUT: Integer
REQUEST_TIMEOUT: Integer
OPERATION_TIMEOUT: Integer
KEEP_ALIVE_TIMEOUT: Integer
SETTINGS_TIMEOUT: Integer
CLOSE_HANDSHAKE_TIMEOUT: Integer
SET_TEMPORARY_NAME: ^(Class klass, ?Symbol pl) -> void
DEFAULT_OPTIONS: Hash[Symbol, untyped]
REQUEST_BODY_IVARS: Array[Symbol]
RESOLVER_TYPES: Array[Symbol]
USER_AGENT: String
type timeout_type = :connect_timeout | :settings_timeout | :close_handshake_timeout | :operation_timeout | :keep_alive_timeout | :read_timeout | :write_timeout | :request_timeout
type timeout = Hash[timeout_type, Numeric?]
type redact_value = :headers | :body | bool
type resolver_cache_option = :memory | :file | (Object & Resolver::_Cache)
def self.new: (?options) -> instance
attr_reader self.options_names: Array[Symbol]
# headers
attr_reader uri: URI?
# headers
attr_reader headers: headers?
# timeout
attr_reader timeout: timeout
# http2_settings
attr_reader http2_settings: Hash[Symbol, Integer | bool]
# max_concurrent_requests
attr_reader max_concurrent_requests: Integer?
# max_requests
attr_reader max_requests: Numeric?
# window_size
attr_reader window_size: Integer
# buffer_size
attr_reader buffer_size: Integer
# body_threshold_size
attr_reader body_threshold_size: Integer
# transport
attr_reader transport: io_type | nil
# addresses
attr_reader addresses: Array[Resolver::Entry]?
# supported_compression_formats
attr_reader supported_compression_formats: Array[String]
# compress_request_body
attr_reader compress_request_body: bool
# decompress_response_body
attr_reader decompress_response_body: bool
# origin
attr_reader origin: URI::Generic?
# base_path
attr_reader base_path: String?
# classes
attr_reader resolver_native_class: singleton(Resolver::Native)
attr_reader resolver_system_class: singleton(Resolver::System)
attr_reader resolver_https_class: singleton(Resolver::HTTPS)
attr_reader http1_class: singleton(Connection::HTTP1)
attr_reader http2_class: singleton(Connection::HTTP2)
attr_reader connection_class: singleton(Connection)
attr_reader pool_class: singleton(Pool)
attr_reader request_class: singleton(Request)
attr_reader response_class: singleton(Response)
attr_reader headers_class: singleton(Headers)
attr_reader request_body_class: singleton(Request::Body)
attr_reader response_body_class: singleton(Response::Body)
attr_reader options_class: singleton(Options)
attr_reader ssl: Hash[Symbol, untyped]
# io
type io_option = _ToIO | Hash[String, _ToIO]
attr_reader io: io_option?
# fallback_protocol
attr_reader fallback_protocol: String
# debug
attr_reader debug: _IOLogger?
# debug_level
attr_reader debug_level: Integer
# persistent
attr_reader persistent: bool
# close_on_fork
attr_reader close_on_fork: bool
# resolver_options
attr_reader resolver_options: Hash[Symbol, untyped]
# resolver_options
attr_reader pool_options: pool_options
# ip_families
attr_reader ip_families: Array[ip_family]?
@resolver_cache: resolver_cache_option
def resolver_class: () -> singleton(Resolver::Resolver)
def resolver_cache: () -> (Object & Resolver::_Cache)
def ==: (Options other) -> bool
def options_equals?: (Options other, ?Array[Symbol] ignore_ivars) -> bool
def merge: (Object & _ToHash[Symbol, untyped] other) -> (instance | self)
def to_hash: () -> Hash[Symbol, untyped]
def extend_with_plugin_classes: (Module pl) -> void
private
def initialize: (?options options) -> void
def do_initialize: () -> void
def access_option: (Hash[Symbol, untyped] | Object | nil obj, Symbol k, Hash[Symbol, Symbol]? ivar_map) -> untyped
# integer
def option_max_concurrent_requests: (Numeric value) -> Numeric
def option_max_requests: (Numeric value) -> Numeric
def option_window_size: (Numeric value) -> Numeric
def option_buffer_size: (Numeric value) -> Numeric
def option_body_threshold_size: (Numeric value) -> Numeric
def option_debug_level: (Numeric value) -> Numeric
# to hash
def option_ssl: (_ToHash[Symbol, untyped] value) -> Hash[Symbol, untyped]
def option_http2_settings: (_ToHash[Symbol, untyped] value) -> Hash[Symbol, untyped]
def option_resolver_options: (_ToHash[Symbol, untyped] value) -> Hash[Symbol, untyped]
def option_pool_options: (_ToHash[Symbol, untyped] value) -> Hash[Symbol, untyped]
# no transform
def option_request_class: (singleton(Request) value) -> singleton(Request)
def option_response_class: (singleton(Response) value) -> singleton(Response)
def option_headers_class: (singleton(Headers) value) -> singleton(Headers)
def option_request_body_class: (singleton(Request::Body) value) -> singleton(Request::Body)
def option_response_body_class: (singleton(Response::Body) value) -> singleton(Response::Body)
def option_connection_class: (singleton(Connection) value) -> singleton(Connection)
def option_options_class: (singleton(Options) value) -> singleton(Options)
def option_pool_class: (singleton(Pool) value) -> singleton(Pool)
def option_resolver_class: (Symbol | singleton(Resolver::Resolver) value) -> (Symbol | singleton(Resolver::Resolver))
def option_io: (io_option value) -> io_option
def option_fallback_protocol: (String value) -> String
def option_debug: (_IOLogger value) -> _IOLogger
def option_debug_redact: (redact_value value) -> redact_value
def option_compress_request_body: (bool value) -> bool
def option_decompress_response_body: (bool value) -> bool
def option_persistent: (bool value) -> bool
def option_close_on_fork: (bool value) -> bool
def option_resolver_cache: (resolver_cache_option value) -> resolver_cache_option
def option_origin: (http_uri | String value) -> http_uri
def option_base_path: (_ToStr value) -> String
def option_headers: (headers_input | Headers value) -> Headers
def option_timeout: (_ToHash[timeout_type, Numeric?]) -> timeout
def option_supported_compression_formats: (_ToS | _ToAry[_ToS] value) -> Array[String]
def option_transport: (_ToS value) -> String
def option_addresses: (ipaddr | _ToAry[ipaddr] value) -> Array[ipaddr]
def option_ip_families: (ip_family | _ToAry[ip_family] value) -> Array[ip_family]
end
type options = Options | Hash[Symbol, untyped]
end
|