-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathchainable.rbs
51 lines (46 loc) · 2.56 KB
/
chainable.rbs
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
module HTTPX
module Chainable
def request: (*Request, **untyped) -> Array[response]
| (Request, **untyped) -> response
| (verb, uri | [uri], **untyped) -> response
| (Array[[verb, uri] | [verb, uri, request_params]], **untyped) -> Array[response]
| (verb, _Each[uri | [uri, request_params]], **untyped) -> Array[response]
def accept: (String) -> Session
def wrap: () { (Session) -> void } -> void
def with: (options) -> Session
| (options) { (Session) -> void } -> void
def plugin: (:auth, ?options) -> Plugins::sessionAuthorization
| (:basic_auth, ?options) -> Plugins::sessionBasicAuth
| (:digest_auth, ?options) -> Plugins::sessionDigestAuth
| (:ntlm_auth, ?options) -> Plugins::sessionNTLMAuth
| (:aws_sdk_authentication, ?options) -> Plugins::sessionAwsSdkAuthentication
| (:brotli, ?options) -> Session
| (:cookies, ?options) -> Plugins::sessionCookies
| (:expect, ?options) -> Session
| (:follow_redirects, ?options) -> Plugins::sessionFollowRedirects
| (:upgrade, ?options) -> Session
| (:h2c, ?options) -> Session
| (:persistent, ?options) -> Plugins::sessionPersistent
| (:proxy, ?options) -> (Plugins::sessionProxy & Plugins::httpProxy)
| (: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
| (:response_cache, ?options) -> Plugins::sessionResponseCache
| (:circuit_breaker, ?options) -> Plugins::sessionCircuitBreaker
| (:oauth, ?options) -> Plugins::sessionOAuth
| (:callbacks, ?options) -> Plugins::sessionCallbacks
| (:content_digest, ?options) -> Plugins::sessionContentDigest
| (:ssrf_filter, ?options) -> Plugins::sessionSsrf
| (:webdav, ?options) -> Plugins::sessionWebDav
| (:xml, ?options) -> Plugins::sessionXML
| (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