mirror of
https://github.com/HoneyryderChuck/httpx.git
synced 2025-10-05 00:02:38 -04:00
The reference for a request verb is now the string which is used everywhere else, instead of the symbol corresponding to it. This was an artifact from the import from httprb, and there is no advantage in it, since these strings are frozen in most use cases, and the transformations from symbol to strings being performed everywhere are prooof that keeping the atom isn't really bringing any benefit.
52 lines
1.8 KiB
Plaintext
52 lines
1.8 KiB
Plaintext
module HTTPX
|
|
class Session
|
|
include Loggable
|
|
include Chainable
|
|
|
|
EMPTY_HASH: Hash[untyped, untyped]
|
|
|
|
@options: Options
|
|
@responses: Hash[Request, response]
|
|
@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 close: (*untyped) -> void
|
|
|
|
def build_request: (verb, generic_uri, ?options) -> Request
|
|
|
|
private
|
|
|
|
def initialize: (?options) { (self) -> void } -> untyped
|
|
| (?options) -> untyped
|
|
|
|
def pool: -> Pool
|
|
def on_response: (Request, response) -> void
|
|
def on_promise: (untyped, untyped) -> void
|
|
def fetch_response: (Request request, untyped, untyped) -> response?
|
|
|
|
def find_connection: (Request, Array[Connection] connections, Options options) -> Connection
|
|
|
|
def set_connection_callbacks: (Connection, Array[Connection], Options) -> void
|
|
|
|
def build_altsvc_connection: (Connection existing_connection, Array[Connection] connections, URI::Generic alt_origin, String origin, Hash[String, String] alt_params, Options options) -> Connection?
|
|
|
|
def build_requests: (verb, uri, options) -> Array[Request]
|
|
| (Array[[verb, uri, options]], options) -> Array[Request]
|
|
| (Array[[verb, uri]], options) -> Array[Request]
|
|
| (verb, _Each[[uri, options]], Options) -> Array[Request]
|
|
| (verb, _Each[uri], options) -> Array[Request]
|
|
|
|
def build_connection: (URI::Generic, Options) -> Connection
|
|
|
|
def send_requests: (*Request) -> Array[response]
|
|
|
|
def _send_requests: (Array[Request]) -> Array[Connection]
|
|
|
|
def receive_requests: (Array[Request], Array[Connection]) -> Array[response]
|
|
end
|
|
end |