-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathpkg.generated.mbti
More file actions
203 lines (172 loc) · 6.34 KB
/
Copy pathpkg.generated.mbti
File metadata and controls
203 lines (172 loc) · 6.34 KB
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
// Generated using `moon info`, DON'T EDIT IT
package "oboard/mio"
import {
"moonbitlang/async/io",
"moonbitlang/core/debug",
}
// Values
pub async fn delete(String, headers? : Map[String, String], body? : &@io.Data, proxy? : Client) -> ResponseBody
pub async fn get(String, headers? : Map[String, String], body? : &@io.Data, proxy? : Client) -> ResponseBody
pub async fn get_stream(String, headers? : Map[String, String], body? : &@io.Data, proxy? : Client) -> (Response, Client)
pub async fn head(String, headers? : Map[String, String], proxy? : Client) -> ResponseBody
pub async fn options(String, headers? : Map[String, String], body? : &@io.Data, proxy? : Client) -> ResponseBody
pub async fn patch(String, &@io.Data, headers? : Map[String, String], proxy? : Client) -> ResponseBody
pub async fn post(String, &@io.Data, headers? : Map[String, String], proxy? : Client) -> ResponseBody
pub async fn post_stream(String, headers? : Map[String, String], proxy? : Client) -> Client
pub async fn put(String, &@io.Data, headers? : Map[String, String], proxy? : Client) -> ResponseBody
pub async fn put_stream(String, headers? : Map[String, String], proxy? : Client) -> Client
// Errors
pub suberror HpackError {
HpackBadInteger
HpackBadString
HpackBadHuffmanPadding
HpackHuffmanEOS
HpackBadIndex(Int)
HpackBadDynamicTableSize(Int)
} derive(ToJson, @debug.Debug)
pub suberror Http2Error {
Http2BadFrame
Http2ConnectionError(String)
Http2StreamReset(Int)
Http2MissingStatus
} derive(ToJson, @debug.Debug)
pub suberror HttpProtocolError {
BadRequest
HttpVersionNotSupported(String)
NotImplemented
} derive(ToJson, @debug.Debug)
#deprecated
pub impl Show for HttpProtocolError
pub suberror IncorrectBodyLength derive(ToJson, @debug.Debug)
pub suberror ProxyError {
ProxyError(Response)
} derive(ToJson, @debug.Debug)
#deprecated
pub impl Show for ProxyError
pub suberror RequestError {
UnsupportedHttpVersion(HttpVersion)
} derive(ToJson, @debug.Debug)
pub suberror URIParseError {
InvalidFormat
UnsupportedProtocol(String)
} derive(ToJson, @debug.Debug)
#deprecated
pub impl Show for URIParseError
// Types and methods
pub struct Client {
// private fields
}
pub async fn Client::Client(String, headers? : Map[String, String], proxy? : Self, verify? : Bool) -> Self
pub fn Client::close(Self) -> Unit
pub async fn Client::end_request(Self) -> Response
pub async fn Client::enter_passthrough_mode(Self) -> Unit
pub async fn Client::flush(Self) -> Unit
pub async fn Client::get(Self, String, extra_headers? : Map[String, String], body? : &@io.Data) -> Response
pub async fn Client::new(String, headers? : Map[String, String], proxy? : Self, verify? : Bool) -> Self
pub async fn Client::post(Self, String, &@io.Data, extra_headers? : Map[String, String]) -> Response
pub async fn Client::put(Self, String, &@io.Data, extra_headers? : Map[String, String]) -> Response
pub async fn Client::request(Self, RequestMethod, String, extra_headers? : Map[String, String]) -> Unit
pub async fn Client::skip_response_body(Self) -> Unit
pub impl @io.Reader for Client
pub impl @io.Writer for Client
pub struct ClientBuilder {
headers : Map[String, String]
mut proxy : Client?
mut timeout : Int?
mut version : HttpVersion
mut verify : Bool
}
pub fn ClientBuilder::build(Self) -> RequestClient
pub fn ClientBuilder::danger_accept_invalid_certs(Self, Bool) -> Self
pub fn ClientBuilder::default_header(Self, String, String) -> Self
pub fn ClientBuilder::default_headers(Self, Map[String, String]) -> Self
pub fn ClientBuilder::http1_only(Self) -> Self
pub fn ClientBuilder::http2_prior_knowledge(Self) -> Self
pub fn ClientBuilder::http3_prior_knowledge(Self) -> Self
pub fn ClientBuilder::new() -> Self
pub fn ClientBuilder::proxy(Self, Client) -> Self
pub fn ClientBuilder::timeout(Self, Int) -> Self
pub struct Cookie {
name : String
value : String
path : String?
expires_raw : String?
max_age : Int64?
domain : String?
secure : Bool
http_only : Bool
extensions : Array[String]
} derive(ToJson, @debug.Debug)
pub fn Cookie::Cookie(String, String, path? : String, expires_raw? : String, max_age? : Int64, domain? : String, secure? : Bool, http_only? : Bool, extensions? : Array[String]) -> Self
pub fn Cookie::new(String, String, path? : String, expires_raw? : String, max_age? : Int64, domain? : String, secure? : Bool, http_only? : Bool, extensions? : Array[String]) -> Self
pub(all) enum HttpVersion {
Http1
Http2
Http3
} derive(Compare, Eq, Hash, ToJson, @debug.Debug)
pub(all) enum Protocol {
Http
Https
} derive(Compare, Eq, Hash, ToJson, @debug.Debug)
pub fn Protocol::default_port(Self) -> Int
#deprecated
pub impl Show for Protocol
pub struct RequestBuilder {
client : RequestClient
meth : RequestMethod
uri : String
headers : Map[String, String]
mut body : &@io.Data
}
pub fn RequestBuilder::body(Self, &@io.Data) -> Self
pub fn RequestBuilder::header(Self, String, String) -> Self
pub fn RequestBuilder::headers(Self, Map[String, String]) -> Self
pub fn RequestBuilder::json(Self, Json) -> Self
pub async fn RequestBuilder::send(Self) -> ResponseBody
pub struct RequestClient {
headers : Map[String, String]
proxy : Client?
timeout : Int?
version : HttpVersion
verify : Bool
}
pub fn RequestClient::builder() -> ClientBuilder
pub fn RequestClient::delete(Self, String) -> RequestBuilder
pub fn RequestClient::get(Self, String) -> RequestBuilder
pub fn RequestClient::head(Self, String) -> RequestBuilder
pub fn RequestClient::new() -> Self
pub fn RequestClient::options(Self, String) -> RequestBuilder
pub fn RequestClient::patch(Self, String) -> RequestBuilder
pub fn RequestClient::post(Self, String) -> RequestBuilder
pub fn RequestClient::put(Self, String) -> RequestBuilder
pub fn RequestClient::request(Self, RequestMethod, String) -> RequestBuilder
pub(all) enum RequestMethod {
Get
Head
Post
Put
Delete
Connect
Options
Trace
Patch
} derive(Compare, Eq, Hash, ToJson, @debug.Debug)
#deprecated
pub impl Show for RequestMethod
pub(all) struct Response {
code : Int
reason : String
headers : Map[String, String]
cookies : Array[Cookie]
} derive(ToJson, @debug.Debug)
#deprecated
pub impl Show for Response
pub(all) struct ResponseBody {
response : Response
body : &@io.Data
}
pub fn ResponseBody::binary(Self) -> Bytes
pub fn ResponseBody::json(Self) -> Json raise
pub fn ResponseBody::text(Self) -> String raise
// Type aliases
// Traits