httpx/sig/chainable.rbs
HoneyryderChuck 6b61b8ccdb fixing signatures
also adding some checks on code, in order for steep to stop complaining
about potential nil returns.
2021-08-10 10:28:58 +01:00

42 lines
1.9 KiB
Plaintext

module HTTPX
module Chainable
def request: (Request | untyped, **untyped) -> response
| (*(Request | untyped), **untyped) -> Array[response]
def accept: (String) -> Session
def wrap: () { (Session) -> void } -> void
def with: (options) -> Session
| (options) { (Session) -> void } -> void
def plugin: (:authentication, ?options) -> Plugins::sessionAuthentication
| (:basic_authentication, ?options) -> Plugins::sessionBasicAuthentication
| (:digest_authentication, ?options) -> Plugins::sessionDigestAuthentication
| (:ntlm_authentication, ?options) -> Plugins::sessionNTLMAuthentication
| (:aws_sdk_authentication, ?options) -> Plugins::sessionAwsSdkAuthentication
| (:compression, ?options) -> Session
| (:cookies, ?options) -> Plugins::sessionCookies
| (:expect, ?options) -> Session
| (:follow_redirects, ?options) -> Plugins::sessionFollowRedirects
| (:upgrade, ?options) -> Session
| (:h2c, ?options) -> Session
| (:multipart, ?options) -> Session
| (:persistent, ?options) -> Plugins::sessionPersistent
| (:proxy, ?options) -> Plugins::sessionProxy
| (:push_promise, ?options) -> Plugins::sessionPushPromise
| (:retries, ?options) -> Plugins::sessionRetries
| (:rate_limiter, ?options) -> Session
| (:stream, ?options) -> Plugins::sessionStream
| (:aws_sigv4, ?options) -> Plugins::awsSigV4Session
| (:grpc, ?options) -> Plugins::grpcSession
| (Symbol | Module, ?options) { (Class) -> void } -> Session
| (Symbol | Module, ?options) -> Session
private
def default_options: () -> Options
def branch: (options) -> Session
| (options) { (Session) -> void } -> Session
end
end