mirror of
https://github.com/HoneyryderChuck/httpx.git
synced 2025-12-07 00:00:31 -05:00
few sig changes (more assertive)
This commit is contained in:
parent
74dfb18ed3
commit
cdcbf14675
@ -13,7 +13,7 @@ module HTTPX
|
|||||||
def shift!: (Integer) -> void
|
def shift!: (Integer) -> void
|
||||||
|
|
||||||
# delegated
|
# delegated
|
||||||
def <<: (string data) -> void
|
def <<: (string data) -> String
|
||||||
def empty?: () -> bool
|
def empty?: () -> bool
|
||||||
def bytesize: () -> Integer
|
def bytesize: () -> Integer
|
||||||
def clear: () -> void
|
def clear: () -> void
|
||||||
|
|||||||
@ -1,6 +1,5 @@
|
|||||||
module HTTPX
|
module HTTPX
|
||||||
class Connection
|
class Connection
|
||||||
|
|
||||||
interface _Parser
|
interface _Parser
|
||||||
|
|
||||||
def on: (Symbol) { (*untyped) -> void } -> void
|
def on: (Symbol) { (*untyped) -> void } -> void
|
||||||
@ -47,6 +46,7 @@ module HTTPX
|
|||||||
def match_altsvcs?: (URI::Generic uri) -> bool
|
def match_altsvcs?: (URI::Generic uri) -> bool
|
||||||
|
|
||||||
def connecting?: () -> bool
|
def connecting?: () -> bool
|
||||||
|
|
||||||
def inflight?: () -> boolish
|
def inflight?: () -> boolish
|
||||||
|
|
||||||
def interests: () -> io_interests?
|
def interests: () -> io_interests?
|
||||||
|
|||||||
@ -3,6 +3,10 @@ module HTTPX
|
|||||||
include Callbacks
|
include Callbacks
|
||||||
include Loggable
|
include Loggable
|
||||||
|
|
||||||
|
UPCASED: Hash[String, String]
|
||||||
|
MAX_REQUESTS: Integer
|
||||||
|
CRLF: String
|
||||||
|
|
||||||
attr_reader pending: Array[Request]
|
attr_reader pending: Array[Request]
|
||||||
attr_reader requests: Array[Request]
|
attr_reader requests: Array[Request]
|
||||||
|
|
||||||
@ -30,11 +34,13 @@ module HTTPX
|
|||||||
|
|
||||||
def handle_error: (StandardError ex) -> void
|
def handle_error: (StandardError ex) -> void
|
||||||
|
|
||||||
|
def on_start: () -> void
|
||||||
|
|
||||||
def on_headers: (Hash[String, Array[String]] headers) -> void
|
def on_headers: (Hash[String, Array[String]] headers) -> void
|
||||||
|
|
||||||
def on_trailers: (Hash[String, Array[String]] headers) -> void
|
def on_trailers: (Hash[String, Array[String]] headers) -> void
|
||||||
|
|
||||||
def on_data: (string chunk) -> void
|
def on_data: (String chunk) -> void
|
||||||
|
|
||||||
def on_complete: () -> void
|
def on_complete: () -> void
|
||||||
|
|
||||||
@ -42,7 +48,7 @@ module HTTPX
|
|||||||
|
|
||||||
def ping: () -> void
|
def ping: () -> void
|
||||||
|
|
||||||
def timeout: () -> Integer
|
def timeout: () -> Numeric
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
@ -54,7 +60,7 @@ module HTTPX
|
|||||||
|
|
||||||
def disable_pipelining: () -> void
|
def disable_pipelining: () -> void
|
||||||
|
|
||||||
def set_protocol_headers: (Request) -> _Each[[headers_key, String]]
|
def set_protocol_headers: (Request) -> _Each[[String, String]]
|
||||||
|
|
||||||
def headline_uri: (Request) -> String
|
def headline_uri: (Request) -> String
|
||||||
|
|
||||||
@ -64,7 +70,7 @@ module HTTPX
|
|||||||
|
|
||||||
def join_trailers: (Request request) -> void
|
def join_trailers: (Request request) -> void
|
||||||
|
|
||||||
def join_headers2: (_Each[[headers_key, String]] headers) -> void
|
def join_headers2: (_Each[[String, String]] headers) -> void
|
||||||
|
|
||||||
def join_body: (Request request) -> void
|
def join_body: (Request request) -> void
|
||||||
|
|
||||||
|
|||||||
@ -3,10 +3,13 @@ module HTTPX
|
|||||||
include Callbacks
|
include Callbacks
|
||||||
include Loggable
|
include Loggable
|
||||||
|
|
||||||
|
MAX_CONCURRENT_REQUESTS: Integer
|
||||||
|
|
||||||
attr_reader streams: Hash[Request, HTTP2Next::Stream]
|
attr_reader streams: Hash[Request, HTTP2Next::Stream]
|
||||||
attr_reader pending: Array[Request]
|
attr_reader pending: Array[Request]
|
||||||
|
|
||||||
@options: Options
|
@options: Options
|
||||||
|
@settings: Hash[Symbol, Integer | bool]
|
||||||
@max_concurrent_requests: Integer
|
@max_concurrent_requests: Integer
|
||||||
@max_requests: Integer
|
@max_requests: Integer
|
||||||
@drains: Hash[Request, String]
|
@drains: Hash[Request, String]
|
||||||
@ -23,7 +26,7 @@ module HTTPX
|
|||||||
|
|
||||||
def <<: (String) -> void
|
def <<: (String) -> void
|
||||||
|
|
||||||
def can_buffer_more_requests: () -> bool
|
def can_buffer_more_requests?: () -> bool
|
||||||
|
|
||||||
def send: (Request) -> void
|
def send: (Request) -> void
|
||||||
|
|
||||||
@ -35,7 +38,7 @@ module HTTPX
|
|||||||
|
|
||||||
alias reset init_connection
|
alias reset init_connection
|
||||||
|
|
||||||
def timeout: () -> Integer
|
def timeout: () -> Numeric
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
@ -45,7 +48,7 @@ module HTTPX
|
|||||||
|
|
||||||
def headline_uri: (Request) -> String
|
def headline_uri: (Request) -> String
|
||||||
|
|
||||||
def set_protocol_headers: (Request) -> _Each[[headers_key, String]]
|
def set_protocol_headers: (Request) -> _Each[[String, String]]
|
||||||
|
|
||||||
def handle: (Request request, HTTP2Next::Stream stream) -> void
|
def handle: (Request request, HTTP2Next::Stream stream) -> void
|
||||||
|
|
||||||
@ -61,9 +64,11 @@ module HTTPX
|
|||||||
|
|
||||||
def on_stream_headers: (HTTP2Next::Stream stream, Request request, Array[[String, String]] headers) -> void
|
def on_stream_headers: (HTTP2Next::Stream stream, Request request, Array[[String, String]] headers) -> void
|
||||||
|
|
||||||
def on_stream_trailers: (HTTP2Next::Stream stream, Request request, Array[[String, String]] headers) -> void
|
def on_stream_trailers: (HTTP2Next::Stream stream, Response response, Array[[String, String]] headers) -> void
|
||||||
|
|
||||||
def on_stream_data: (HTTP2Next::Stream stream, Request request, string data) -> void
|
def on_stream_data: (HTTP2Next::Stream stream, Request request, String data) -> void
|
||||||
|
|
||||||
|
def on_stream_refuse: (HTTP2Next::Stream stream, Request request, StandardError error) -> void
|
||||||
|
|
||||||
def on_stream_close: (HTTP2Next::Stream stream, Request request, (Symbol | StandardError)? error) -> void
|
def on_stream_close: (HTTP2Next::Stream stream, Request request, (Symbol | StandardError)? error) -> void
|
||||||
|
|
||||||
@ -74,12 +79,18 @@ module HTTPX
|
|||||||
def on_close: (Integer last_frame, Symbol? error, String? payload) -> void
|
def on_close: (Integer last_frame, Symbol? error, String? payload) -> void
|
||||||
|
|
||||||
def on_frame_sent: (HTTP2Next::frame) -> void
|
def on_frame_sent: (HTTP2Next::frame) -> void
|
||||||
|
|
||||||
def on_frame_received: (HTTP2Next::frame) -> void
|
def on_frame_received: (HTTP2Next::frame) -> void
|
||||||
|
|
||||||
|
def on_altsvc: (String origin, HTTP2Next::frame) -> void
|
||||||
|
|
||||||
def on_promise: (HTTP2Next::Stream) -> void
|
def on_promise: (HTTP2Next::Stream) -> void
|
||||||
|
|
||||||
def on_origin: (String) -> void
|
def on_origin: (String) -> void
|
||||||
|
|
||||||
def on_pong: (string ping) -> void
|
def on_pong: (string ping) -> void
|
||||||
|
|
||||||
|
class Error < ::HTTPX::Error
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -2,30 +2,32 @@ module HTTPX
|
|||||||
class Headers
|
class Headers
|
||||||
include _ToS
|
include _ToS
|
||||||
|
|
||||||
@headers: Hash[headers_key, Array[String]]
|
EMPTY: Array[untyped]
|
||||||
|
|
||||||
|
@headers: Hash[String, Array[String]]
|
||||||
|
|
||||||
def self.new: (?untyped headers) -> instance
|
def self.new: (?untyped headers) -> instance
|
||||||
|
|
||||||
def ==: (untyped other) -> bool
|
def ==: (untyped other) -> bool
|
||||||
|
|
||||||
def []: (headers_key field) -> _ToS?
|
def []: (String field) -> String?
|
||||||
def []=: (headers_key field, headers_value value) -> void
|
def []=: (String field, headers_value value) -> void
|
||||||
|
|
||||||
def add: (headers_key field, string value) -> void
|
def add: (String field, string value) -> void
|
||||||
def delete: (headers_key field) -> Array[String]?
|
def delete: (String field) -> Array[String]?
|
||||||
|
|
||||||
def each: (?_Each[[headers_key, String]]? extra_headers) { (headers_key, String) -> void } -> void
|
def each: (?_Each[[String, String]]? extra_headers) { (String k, String v) -> void } -> void
|
||||||
| (?_Each[[headers_key, String]]? extra_headers) -> Enumerable[[headers_key, String]]
|
| (?_Each[[String, String]]? extra_headers) -> Enumerable[[String, String]]
|
||||||
|
|
||||||
def get: (headers_key field) -> Array[String]
|
def get: (String field) -> Array[String]
|
||||||
def key?: (headers_key downcased_key) -> bool
|
def key?: (String downcased_key) -> bool
|
||||||
|
|
||||||
def merge: (_Each[[headers_key, headers_value]] other) -> Headers
|
def merge: (_Each[[String, headers_value]] other) -> Headers
|
||||||
|
|
||||||
def same_headers?: (untyped headers) -> bool
|
def same_headers?: (untyped headers) -> bool
|
||||||
|
|
||||||
def to_a: () -> Array[[headers_key, String]]
|
def to_a: () -> Array[[String, String]]
|
||||||
def to_hash: () -> Hash[headers_key, String]
|
def to_hash: () -> Hash[String, String]
|
||||||
alias to_h to_hash
|
alias to_h to_hash
|
||||||
|
|
||||||
def inspect: () -> String
|
def inspect: () -> String
|
||||||
@ -34,12 +36,11 @@ module HTTPX
|
|||||||
|
|
||||||
def initialize: (?headers?) -> untyped
|
def initialize: (?headers?) -> untyped
|
||||||
def array_value: (headers_value) -> Array[String]
|
def array_value: (headers_value) -> Array[String]
|
||||||
def downcased: (headers_key) -> String
|
def downcased: (_ToS field) -> String
|
||||||
end
|
end
|
||||||
|
|
||||||
type headers_key = String | Symbol
|
|
||||||
type headers_value = _ToS | Array[_ToS]
|
type headers_value = _ToS | Array[_ToS]
|
||||||
type headers_hash = Hash[headers_key, headers_value]
|
type headers_hash = Hash[_ToS, headers_value]
|
||||||
type headers_input = headers_hash | Array[[headers_key, string]]
|
type headers_input = headers_hash | Array[[_ToS, string]]
|
||||||
type headers = Headers | headers_input
|
type headers = Headers | headers_input
|
||||||
end
|
end
|
||||||
|
|||||||
@ -11,7 +11,7 @@ module HTTPX
|
|||||||
DEFAULT_OPTIONS: Hash[Symbol, untyped]
|
DEFAULT_OPTIONS: Hash[Symbol, untyped]
|
||||||
|
|
||||||
type timeout_type = :connect_timeout | :settings_timeout | :operation_timeout | :keep_alive_timeout | :total_timeout
|
type timeout_type = :connect_timeout | :settings_timeout | :operation_timeout | :keep_alive_timeout | :total_timeout
|
||||||
type timeout = Hash[timeout_type, Numeric?]
|
type timeout = Hash[timeout_type, Numeric]
|
||||||
|
|
||||||
def self.new: (?options) -> instance
|
def self.new: (?options) -> instance
|
||||||
|
|
||||||
@ -26,6 +26,9 @@ module HTTPX
|
|||||||
# timeout
|
# timeout
|
||||||
attr_reader timeout: timeout
|
attr_reader timeout: timeout
|
||||||
|
|
||||||
|
# http2_settings
|
||||||
|
attr_reader http2_settings: Hash[Symbol, Integer | bool]
|
||||||
|
|
||||||
# max_concurrent_requests
|
# max_concurrent_requests
|
||||||
attr_reader max_concurrent_requests: Integer?
|
attr_reader max_concurrent_requests: Integer?
|
||||||
|
|
||||||
@ -59,6 +62,9 @@ module HTTPX
|
|||||||
# body
|
# body
|
||||||
attr_reader body: bodyIO?
|
attr_reader body: bodyIO?
|
||||||
|
|
||||||
|
# body
|
||||||
|
attr_reader origin: URI::Generic?
|
||||||
|
|
||||||
# ssl
|
# ssl
|
||||||
|
|
||||||
# http2_settings
|
# http2_settings
|
||||||
|
|||||||
@ -5,9 +5,9 @@ module HTTPX
|
|||||||
interface _HTTP1Events
|
interface _HTTP1Events
|
||||||
|
|
||||||
def on_start: () -> void
|
def on_start: () -> void
|
||||||
def on_headers: (parsed_headers) -> void
|
def on_headers: (parsed_headers headers) -> void
|
||||||
def on_trailers: (parsed_headers) -> void
|
def on_trailers: (parsed_headers trailers) -> void
|
||||||
def on_data: (String) -> void
|
def on_data: (String data) -> void
|
||||||
def on_complete: () -> void
|
def on_complete: () -> void
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@ -9,13 +9,21 @@ module HTTPX
|
|||||||
|
|
||||||
module AWSSigV4
|
module AWSSigV4
|
||||||
|
|
||||||
Credentials: _SigV4Credentials
|
class Credentials < Struct[[String, String, String?]]
|
||||||
|
attr_reader username: String
|
||||||
|
attr_reader password: String
|
||||||
|
attr_reader security_token: String?
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
class Signer
|
class Signer
|
||||||
|
|
||||||
def sign!: (Request) -> void
|
@unsigned_headers: Set[String]
|
||||||
|
|
||||||
|
def sign!: (Request & RequestMethods request) -> void
|
||||||
|
|
||||||
|
def self.new: (instance) -> instance
|
||||||
|
| (**untyped params) -> instance
|
||||||
private
|
private
|
||||||
|
|
||||||
def initialize: (
|
def initialize: (
|
||||||
@ -33,9 +41,10 @@ module HTTPX
|
|||||||
) -> untyped
|
) -> untyped
|
||||||
|
|
||||||
|
|
||||||
def sha256_hexdigest: (bodyIO value) -> String
|
def hexdigest: (bodyIO value) -> String
|
||||||
|
|
||||||
def hmac: (String key, String value) -> String
|
def hmac: (String key, String value) -> String
|
||||||
|
|
||||||
def hexhmac: (String key, String value) -> String
|
def hexhmac: (String key, String value) -> String
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@ -10,6 +10,6 @@ module HTTPX
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
type sessionBasicAuthentication = sessionAuthentication & BasicAuthentication::InstanceMethods
|
type sessionBasicAuthentication = sessionAuthentication & Authentication::InstanceMethods & BasicAuthentication::InstanceMethods
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@ -1,34 +1,55 @@
|
|||||||
module HTTPX
|
module HTTPX
|
||||||
module Plugins
|
module Plugins
|
||||||
module Multipart
|
module Multipart
|
||||||
|
interface _MultipartInput
|
||||||
|
def filename: () -> String
|
||||||
|
def content_type: () -> String
|
||||||
|
def read: (?int? length, ?string? output) -> String?
|
||||||
|
end
|
||||||
|
|
||||||
|
MULTIPART_VALUE_COND: ^(_Reader | record_multipart_value value) -> bool
|
||||||
|
|
||||||
def self.load_dependencies: (singleton(Session)) -> void
|
def self.load_dependencies: (singleton(Session)) -> void
|
||||||
def self.configure: (*untyped) -> void
|
def self.configure: (*untyped) -> void
|
||||||
def self?.encode: (untyped) -> (Encoder | Transcoder::Form::Encoder)
|
def self?.encode: (untyped) -> (Encoder | Transcoder::Form::Encoder)
|
||||||
def self?.decode: (HTTPX::Response response) -> Transcoder::_Decoder
|
def self?.decode: (HTTPX::Response response) -> Transcoder::_Decoder
|
||||||
|
|
||||||
|
def self?.normalize_keys: [U] (_ToS key, _ToAry[untyped] | _ToHash[_ToS, untyped] | untyped value) { (String, ?untyped) -> U } -> U
|
||||||
|
|
||||||
type multipart_value = string | Pathname | File | _Reader
|
type multipart_value = string | Pathname | File | _Reader
|
||||||
|
|
||||||
type record_multipart_value = multipart_value |
|
type record_multipart_value = { content_type: String, filename: String, body: multipart_value } |
|
||||||
{ content_type: String, filename: String, body: multipart_value } |
|
|
||||||
{ content_type: String, body: multipart_value }
|
{ content_type: String, body: multipart_value }
|
||||||
|
|
||||||
type multipart_nested_value = multipart_value | _ToAry[multipart_value] | _ToHash[string, multipart_value]
|
type multipart_nested_value = multipart_value | _ToAry[multipart_value] | _ToHash[string, multipart_value]
|
||||||
|
|
||||||
class Encoder
|
class Encoder
|
||||||
include Transcoder::_Encoder
|
include Transcoder::_Encoder
|
||||||
include _Reader
|
|
||||||
|
@boundary: String
|
||||||
|
@part_index: Integer
|
||||||
|
@buffer: String
|
||||||
|
|
||||||
|
@form: Enumerable[[Symbol | string, multipart_nested_value]]
|
||||||
|
@parts: Array[_Reader]
|
||||||
|
|
||||||
def content_type: () -> String
|
def content_type: () -> String
|
||||||
|
|
||||||
|
def read: (?int? length, ?string? buffer) -> String?
|
||||||
|
|
||||||
|
def rewind: () -> void
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
def initialize: (_Each[[Symbol | string, multipart_nested_value]] multipart_data) -> untyped
|
def to_parts: (Enumerable[[Symbol | string, multipart_nested_value]] multipart_data) -> Array[_Reader]
|
||||||
|
|
||||||
|
def initialize: (Enumerable[[Symbol | string, multipart_nested_value]] multipart_data) -> untyped
|
||||||
|
|
||||||
def header_part: (string key, String content_type, String? filename) -> StringIO
|
def header_part: (string key, String content_type, String? filename) -> StringIO
|
||||||
|
|
||||||
def read_chunks: (String buffer, Integer? length) -> void
|
def read_chunks: (String buffer, ?Integer? length) -> void
|
||||||
|
|
||||||
def read_from_part: (Integer? max_length) -> void
|
def read_from_part: (?Integer? max_length) -> String?
|
||||||
end
|
end
|
||||||
|
|
||||||
class Decoder
|
class Decoder
|
||||||
@ -63,11 +84,14 @@ module HTTPX
|
|||||||
end
|
end
|
||||||
|
|
||||||
module Part
|
module Part
|
||||||
def self?.call: (multipart_nested_value) -> ([_Reader, String, String?])
|
def self?.call: [U] (_MultipartInput multipart_input) -> [U, String, String]
|
||||||
|
| (multipart_nested_value input) -> ([StringIO, String, String?] | [File, String, String])
|
||||||
end
|
end
|
||||||
|
|
||||||
module MimeTypeDetector
|
module MimeTypeDetector
|
||||||
def self?.call: (::IO file, ?String filename) -> String?
|
DEFAULT_MIMETYPE: String
|
||||||
|
|
||||||
|
def self?.call: (::IO file, String filename) -> String?
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@ -1,12 +1,13 @@
|
|||||||
module HTTPX
|
module HTTPX
|
||||||
class Request
|
class Request
|
||||||
|
extend Forwardable
|
||||||
include Callbacks
|
include Callbacks
|
||||||
|
|
||||||
METHODS: Array[verb]
|
METHODS: Array[Symbol]
|
||||||
USER_AGENT: String
|
USER_AGENT: String
|
||||||
|
|
||||||
attr_reader verb: verb
|
attr_reader verb: Symbol
|
||||||
attr_reader uri: URI::HTTP | URI::HTTPS
|
attr_reader uri: URI::Generic
|
||||||
attr_reader headers: Headers
|
attr_reader headers: Headers
|
||||||
attr_reader body: Body
|
attr_reader body: Body
|
||||||
attr_reader state: Symbol
|
attr_reader state: Symbol
|
||||||
@ -14,13 +15,13 @@ module HTTPX
|
|||||||
attr_reader response: response?
|
attr_reader response: response?
|
||||||
attr_reader drain_error: StandardError?
|
attr_reader drain_error: StandardError?
|
||||||
|
|
||||||
def initialize: (verb | String, generic_uri, ?options?) -> untyped
|
def initialize: (Symbol | String, generic_uri, ?options) -> untyped
|
||||||
|
|
||||||
def interests: () -> (:r | :w)
|
def interests: () -> (:r | :w)
|
||||||
|
|
||||||
def merge_headers: (_Each[[headers_key, headers_value]]) -> void
|
def merge_headers: (_Each[[String, headers_value]]) -> void
|
||||||
|
|
||||||
def scheme: () -> ("http" | "https")
|
def scheme: () -> String
|
||||||
|
|
||||||
def response=: (response) -> void
|
def response=: (response) -> void
|
||||||
|
|
||||||
@ -49,6 +50,7 @@ module HTTPX
|
|||||||
def each: () { (String) -> void } -> void
|
def each: () { (String) -> void } -> void
|
||||||
| () -> Enumerable[String]
|
| () -> Enumerable[String]
|
||||||
|
|
||||||
|
def rewind: () -> void
|
||||||
def empty?: () -> bool
|
def empty?: () -> bool
|
||||||
def bytesize: () -> Numeric
|
def bytesize: () -> Numeric
|
||||||
def stream: (Transcoder::_Encoder) -> bodyIO
|
def stream: (Transcoder::_Encoder) -> bodyIO
|
||||||
@ -59,8 +61,9 @@ module HTTPX
|
|||||||
end
|
end
|
||||||
|
|
||||||
class ProcIO
|
class ProcIO
|
||||||
include _Writer
|
|
||||||
def initialize: (^(String) -> void) -> untyped
|
def initialize: (^(String) -> void) -> untyped
|
||||||
|
|
||||||
|
def write: (String data) -> Integer
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@ -22,7 +22,7 @@ module HTTPX
|
|||||||
def close: () -> void
|
def close: () -> void
|
||||||
def uri: () -> URI::Generic
|
def uri: () -> URI::Generic
|
||||||
|
|
||||||
def merge_headers: (_Each[[headers_key, headers_value]]) -> void
|
def merge_headers: (_Each[[String, headers_value]]) -> void
|
||||||
def bodyless?: () -> bool
|
def bodyless?: () -> bool
|
||||||
def content_type: () -> ContentType
|
def content_type: () -> ContentType
|
||||||
def complete?: () -> bool
|
def complete?: () -> bool
|
||||||
|
|||||||
@ -9,19 +9,16 @@ module HTTPX
|
|||||||
@responses: Hash[Request, response]
|
@responses: Hash[Request, response]
|
||||||
@persistent: bool?
|
@persistent: bool?
|
||||||
|
|
||||||
|
def self.plugin: (Symbol | Module plugin, ?options? options) ?{ (Class) -> void } -> singleton(Session)
|
||||||
|
|
||||||
|
def self.default_options: -> Options
|
||||||
|
|
||||||
def wrap: () { (instance) -> void } -> void
|
def wrap: () { (instance) -> void } -> void
|
||||||
|
|
||||||
def close: (*untyped) -> void
|
def close: (*untyped) -> void
|
||||||
|
|
||||||
def build_request: (String | verb, generic_uri, ?options) -> Request
|
def build_request: (String | verb, generic_uri, ?options) -> Request
|
||||||
|
|
||||||
# def self.plugin: (Symbol | Module, ?options) { (Class) -> void } -> singleton(Session)
|
|
||||||
# | (Symbol | Module, ?options) -> singleton(Session)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def self.default_options: -> Options
|
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
def initialize: (?options) { (self) -> void } -> untyped
|
def initialize: (?options) { (self) -> void } -> untyped
|
||||||
|
|||||||
@ -7,8 +7,7 @@ module HTTPX
|
|||||||
|
|
||||||
def self?.register: (String tag, _Encode handler) -> void
|
def self?.register: (String tag, _Encode handler) -> void
|
||||||
|
|
||||||
def self?.normalize_keys: (_ToS key, _ToAry[untyped] | _ToHash[_ToS, untyped] | untyped value) { (String, ?untyped) -> void } -> void
|
def self?.normalize_keys: [U] (_ToS key, _ToAry[untyped] | _ToHash[_ToS, untyped] | untyped value, ?(^(untyped value) -> bool | nil) cond) { (String, ?untyped) -> U } -> U
|
||||||
| (_ToS key, untyped value, Proc? cond) { (String, untyped) -> void } -> void
|
|
||||||
|
|
||||||
def self?.normalize_query: (Hash[String, untyped] params, String name, String v, Integer depth) -> void
|
def self?.normalize_query: (Hash[String, untyped] params, String name, String v, Integer depth) -> void
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user