wreq-js 2.2.1 → 2.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/wreq-js.cjs +2046 -2575
- package/dist/wreq-js.cjs.map +1 -1
- package/dist/wreq-js.d.ts +829 -724
- package/dist/wreq-js.js +2028 -2535
- package/dist/wreq-js.js.map +1 -1
- package/package.json +10 -13
- package/rust/wreq-js.darwin-arm64.node +0 -0
- package/rust/wreq-js.darwin-x64.node +0 -0
- package/rust/wreq-js.linux-arm64-gnu.node +0 -0
- package/rust/wreq-js.linux-x64-gnu.node +0 -0
- package/rust/wreq-js.linux-x64-musl.node +0 -0
- package/rust/wreq-js.win32-x64-msvc.node +0 -0
- package/dist/wreq-js.d.cts +0 -1041
package/dist/wreq-js.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { Readable } from
|
|
2
|
-
import { ReadableStream } from
|
|
1
|
+
import { Readable } from "node:stream";
|
|
2
|
+
import { ReadableStream } from "node:stream/web";
|
|
3
3
|
|
|
4
|
+
//#region src/generated-types.d.ts
|
|
4
5
|
/**
|
|
5
6
|
* Auto-generated from Rust build script
|
|
6
7
|
* DO NOT EDIT MANUALLY
|
|
@@ -13,7 +14,8 @@ type BrowserProfile = 'chrome_100' | 'chrome_101' | 'chrome_104' | 'chrome_105'
|
|
|
13
14
|
* Operating systems supported for emulation
|
|
14
15
|
*/
|
|
15
16
|
type EmulationOS = 'windows' | 'macos' | 'linux' | 'android' | 'ios';
|
|
16
|
-
|
|
17
|
+
//#endregion
|
|
18
|
+
//#region src/types.d.ts
|
|
17
19
|
/**
|
|
18
20
|
* Controls how cookies are scoped for a request.
|
|
19
21
|
* - "session": reuse an explicit Session or sessionId across calls.
|
|
@@ -25,7 +27,17 @@ type CookieMode = "session" | "ephemeral";
|
|
|
25
27
|
* that only need to carry a session id.
|
|
26
28
|
*/
|
|
27
29
|
interface SessionHandle {
|
|
28
|
-
|
|
30
|
+
readonly id: string;
|
|
31
|
+
}
|
|
32
|
+
interface SessionCookie {
|
|
33
|
+
name: string;
|
|
34
|
+
value: string;
|
|
35
|
+
domain?: string;
|
|
36
|
+
path?: string;
|
|
37
|
+
secure: boolean;
|
|
38
|
+
httpOnly: boolean;
|
|
39
|
+
sameSite?: "lax" | "strict" | "none";
|
|
40
|
+
expiresAtMs?: number;
|
|
29
41
|
}
|
|
30
42
|
/**
|
|
31
43
|
* A tuple of [name, value] pairs used for initializing headers.
|
|
@@ -58,89 +70,90 @@ type AlpnProtocol = "HTTP1" | "HTTP2" | "HTTP3";
|
|
|
58
70
|
type AlpsProtocol = "HTTP1" | "HTTP2" | "HTTP3";
|
|
59
71
|
type TlsVersion = "1.0" | "1.1" | "1.2" | "1.3" | "TLS1.0" | "TLS1.1" | "TLS1.2" | "TLS1.3";
|
|
60
72
|
type Http2PseudoHeaderId = "Method" | "Scheme" | "Authority" | "Path" | "Protocol";
|
|
73
|
+
type TrustStoreMode = "combined" | "mozilla" | "defaultPaths";
|
|
61
74
|
type Http2SettingId = "HeaderTableSize" | "EnablePush" | "MaxConcurrentStreams" | "InitialWindowSize" | "MaxFrameSize" | "MaxHeaderListSize" | "EnableConnectProtocol" | "NoRfc7540Priorities";
|
|
62
75
|
interface Http2StreamDependency {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
76
|
+
dependencyId: number;
|
|
77
|
+
weight: number;
|
|
78
|
+
exclusive?: boolean;
|
|
66
79
|
}
|
|
67
80
|
interface Http2Priority {
|
|
68
|
-
|
|
69
|
-
|
|
81
|
+
streamId: number;
|
|
82
|
+
dependency: Http2StreamDependency;
|
|
70
83
|
}
|
|
71
84
|
interface Http2ExperimentalSetting {
|
|
72
|
-
|
|
73
|
-
|
|
85
|
+
id: number;
|
|
86
|
+
value: number;
|
|
74
87
|
}
|
|
75
88
|
interface CustomTlsOptions {
|
|
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
|
-
|
|
89
|
+
alpnProtocols?: AlpnProtocol[];
|
|
90
|
+
alpsProtocols?: AlpsProtocol[];
|
|
91
|
+
alpsUseNewCodepoint?: boolean;
|
|
92
|
+
sessionTicket?: boolean;
|
|
93
|
+
minTlsVersion?: TlsVersion;
|
|
94
|
+
maxTlsVersion?: TlsVersion;
|
|
95
|
+
preSharedKey?: boolean;
|
|
96
|
+
enableEchGrease?: boolean;
|
|
97
|
+
permuteExtensions?: boolean;
|
|
98
|
+
greaseEnabled?: boolean;
|
|
99
|
+
enableOcspStapling?: boolean;
|
|
100
|
+
enableSignedCertTimestamps?: boolean;
|
|
101
|
+
recordSizeLimit?: number;
|
|
102
|
+
pskSkipSessionTicket?: boolean;
|
|
103
|
+
keySharesLimit?: number;
|
|
104
|
+
pskDheKe?: boolean;
|
|
105
|
+
renegotiation?: boolean;
|
|
106
|
+
delegatedCredentials?: string;
|
|
107
|
+
curvesList?: string;
|
|
108
|
+
cipherList?: string;
|
|
109
|
+
sigalgsList?: string;
|
|
110
|
+
certificateCompressionAlgorithms?: Array<"zlib" | "brotli" | "zstd">;
|
|
111
|
+
extensionPermutation?: number[];
|
|
112
|
+
aesHwOverride?: boolean;
|
|
113
|
+
preserveTls13CipherList?: boolean;
|
|
114
|
+
randomAesHwOverride?: boolean;
|
|
102
115
|
}
|
|
103
116
|
interface CustomHttp1Options {
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
117
|
+
http09Responses?: boolean;
|
|
118
|
+
writev?: boolean;
|
|
119
|
+
maxHeaders?: number;
|
|
120
|
+
readBufExactSize?: number;
|
|
121
|
+
maxBufSize?: number;
|
|
122
|
+
ignoreInvalidHeadersInResponses?: boolean;
|
|
123
|
+
allowSpacesAfterHeaderNameInResponses?: boolean;
|
|
124
|
+
allowObsoleteMultilineHeadersInResponses?: boolean;
|
|
112
125
|
}
|
|
113
126
|
interface CustomHttp2Options {
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
127
|
+
adaptiveWindow?: boolean;
|
|
128
|
+
initialStreamId?: number;
|
|
129
|
+
initialConnectionWindowSize?: number;
|
|
130
|
+
initialWindowSize?: number;
|
|
131
|
+
initialMaxSendStreams?: number;
|
|
132
|
+
maxFrameSize?: number;
|
|
133
|
+
keepAliveInterval?: number;
|
|
134
|
+
keepAliveTimeout?: number;
|
|
135
|
+
keepAliveWhileIdle?: boolean;
|
|
136
|
+
maxConcurrentResetStreams?: number;
|
|
137
|
+
maxSendBufferSize?: number;
|
|
138
|
+
maxConcurrentStreams?: number;
|
|
139
|
+
maxHeaderListSize?: number;
|
|
140
|
+
maxPendingAcceptResetStreams?: number;
|
|
141
|
+
enablePush?: boolean;
|
|
142
|
+
headerTableSize?: number;
|
|
143
|
+
enableConnectProtocol?: boolean;
|
|
144
|
+
noRfc7540Priorities?: boolean;
|
|
145
|
+
settingsOrder?: Http2SettingId[];
|
|
146
|
+
headersPseudoOrder?: Http2PseudoHeaderId[];
|
|
147
|
+
headersStreamDependency?: Http2StreamDependency;
|
|
148
|
+
priorities?: Http2Priority[];
|
|
149
|
+
experimentalSettings?: Http2ExperimentalSetting[];
|
|
137
150
|
}
|
|
138
151
|
interface CustomEmulationOptions {
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
152
|
+
tlsOptions?: CustomTlsOptions;
|
|
153
|
+
http1Options?: CustomHttp1Options;
|
|
154
|
+
http2Options?: CustomHttp2Options;
|
|
155
|
+
headers?: HeadersInit;
|
|
156
|
+
origHeaders?: string[];
|
|
144
157
|
}
|
|
145
158
|
/**
|
|
146
159
|
* Represents the various types of data that can be used as a request body.
|
|
@@ -168,43 +181,43 @@ type BodyInit = string | ArrayBuffer | ArrayBufferView | URLSearchParams | Buffe
|
|
|
168
181
|
type WebSocketBinaryType = "nodebuffer" | "arraybuffer" | "blob";
|
|
169
182
|
type WebSocketEventType = "open" | "message" | "close" | "error";
|
|
170
183
|
interface WebSocketOpenEvent {
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
184
|
+
type: "open";
|
|
185
|
+
isTrusted: false;
|
|
186
|
+
timeStamp: number;
|
|
187
|
+
target: WebSocket;
|
|
188
|
+
currentTarget: WebSocket;
|
|
176
189
|
}
|
|
177
190
|
interface WebSocketMessageEvent {
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
191
|
+
type: "message";
|
|
192
|
+
isTrusted: false;
|
|
193
|
+
timeStamp: number;
|
|
194
|
+
data: string | Buffer | ArrayBuffer | Blob;
|
|
195
|
+
target: WebSocket;
|
|
196
|
+
currentTarget: WebSocket;
|
|
184
197
|
}
|
|
185
198
|
interface WebSocketErrorEvent {
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
199
|
+
type: "error";
|
|
200
|
+
isTrusted: false;
|
|
201
|
+
timeStamp: number;
|
|
202
|
+
message?: string;
|
|
203
|
+
target: WebSocket;
|
|
204
|
+
currentTarget: WebSocket;
|
|
192
205
|
}
|
|
193
206
|
interface WebSocketCloseEvent {
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
207
|
+
type: "close";
|
|
208
|
+
isTrusted: false;
|
|
209
|
+
timeStamp: number;
|
|
210
|
+
/**
|
|
211
|
+
* WebSocket close status code (RFC 6455).
|
|
212
|
+
*/
|
|
213
|
+
code: number;
|
|
214
|
+
/**
|
|
215
|
+
* UTF-8 close reason sent by the peer.
|
|
216
|
+
*/
|
|
217
|
+
reason: string;
|
|
218
|
+
wasClean: boolean;
|
|
219
|
+
target: WebSocket;
|
|
220
|
+
currentTarget: WebSocket;
|
|
208
221
|
}
|
|
209
222
|
/**
|
|
210
223
|
* Options for configuring a fetch style request with wreq-specific extensions
|
|
@@ -222,205 +235,264 @@ interface WebSocketCloseEvent {
|
|
|
222
235
|
* };
|
|
223
236
|
* ```
|
|
224
237
|
*/
|
|
238
|
+
type RequestEventType = "request_start" | "request_sent" | "response_headers" | "body_progress" | "body_complete" | "done" | "error";
|
|
239
|
+
interface RequestEvent {
|
|
240
|
+
type: RequestEventType;
|
|
241
|
+
timestamp: number;
|
|
242
|
+
status?: number;
|
|
243
|
+
url?: string;
|
|
244
|
+
contentLength?: number | null;
|
|
245
|
+
downloadedBytes?: number;
|
|
246
|
+
message?: string;
|
|
247
|
+
}
|
|
248
|
+
interface RequestDiagnostics {
|
|
249
|
+
totalDurationMs?: number;
|
|
250
|
+
headersDurationMs?: number;
|
|
251
|
+
status?: number;
|
|
252
|
+
localAddr?: string;
|
|
253
|
+
remoteAddr?: string;
|
|
254
|
+
tlsPeerCertificatePresent?: boolean;
|
|
255
|
+
tlsPeerCertificateChainLength?: number;
|
|
256
|
+
}
|
|
225
257
|
interface RequestInit {
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
258
|
+
/**
|
|
259
|
+
* A string to set request's method.
|
|
260
|
+
* @default 'GET'
|
|
261
|
+
*/
|
|
262
|
+
method?: string;
|
|
263
|
+
/**
|
|
264
|
+
* A Headers object, an object literal, or an array of two-item arrays to set request's headers.
|
|
265
|
+
*/
|
|
266
|
+
headers?: HeadersInit;
|
|
267
|
+
/**
|
|
268
|
+
* A BodyInit object or null to set request's body.
|
|
269
|
+
*/
|
|
270
|
+
body?: BodyInit | null;
|
|
271
|
+
/**
|
|
272
|
+
* An AbortSignal to set request's signal.
|
|
273
|
+
*/
|
|
274
|
+
signal?: AbortSignal | null;
|
|
275
|
+
/**
|
|
276
|
+
* A string indicating whether request follows redirects, results in an error upon
|
|
277
|
+
* encountering a redirect, or returns the redirect (in an opaque fashion).
|
|
278
|
+
* @default 'follow'
|
|
279
|
+
*/
|
|
280
|
+
redirect?: "follow" | "manual" | "error";
|
|
281
|
+
/**
|
|
282
|
+
* Transport instance to use for this request. When provided, transport-level
|
|
283
|
+
* options such as `browser`, `os`, `proxy`, and `insecure` must not be set.
|
|
284
|
+
*/
|
|
285
|
+
transport?: Transport;
|
|
286
|
+
/**
|
|
287
|
+
* Browser profile to impersonate for this request.
|
|
288
|
+
* Applies browser profile behavior handled by the native layer.
|
|
289
|
+
* Ignored when `transport` is provided.
|
|
290
|
+
* @default 'chrome_142'
|
|
291
|
+
*/
|
|
292
|
+
browser?: BrowserProfile;
|
|
293
|
+
/**
|
|
294
|
+
* Operating system to emulate for this request.
|
|
295
|
+
* Influences platform-specific behavior handled by the native layer.
|
|
296
|
+
* Ignored when `transport` is provided.
|
|
297
|
+
* @default 'macos'
|
|
298
|
+
*/
|
|
299
|
+
os?: EmulationOS;
|
|
300
|
+
/**
|
|
301
|
+
* Custom emulation overrides. When `browser` or `os` is present, these fields
|
|
302
|
+
* layer on top of the resolved preset profile. When both are omitted, this
|
|
303
|
+
* switches the request into standalone custom emulation mode.
|
|
304
|
+
*/
|
|
305
|
+
emulation?: CustomEmulationOptions;
|
|
306
|
+
/**
|
|
307
|
+
* Proxy URL to route the request through (e.g., 'http://proxy.example.com:8080').
|
|
308
|
+
* Proxy support depends on the native layer and proxy scheme.
|
|
309
|
+
* Ignored when `transport` is provided.
|
|
310
|
+
*/
|
|
311
|
+
proxy?: string;
|
|
312
|
+
/**
|
|
313
|
+
* Request timeout in milliseconds. If the request takes longer than this value,
|
|
314
|
+
* it will be aborted.
|
|
315
|
+
* @default 30000
|
|
316
|
+
*/
|
|
317
|
+
timeout?: number;
|
|
318
|
+
/**
|
|
319
|
+
* Controls how cookies are managed for this call.
|
|
320
|
+
* - "ephemeral": default when no session/sessionId is provided. Creates an isolated session per request.
|
|
321
|
+
* - "session": requires an explicit session or sessionId and reuses its cookie jar.
|
|
322
|
+
*/
|
|
323
|
+
cookieMode?: CookieMode;
|
|
324
|
+
/**
|
|
325
|
+
* Session instance to bind this request to. When provided, {@link cookieMode}
|
|
326
|
+
* automatically behaves like `"session"`.
|
|
327
|
+
*/
|
|
328
|
+
session?: Session;
|
|
329
|
+
/**
|
|
330
|
+
* Identifier of an existing session created elsewhere (e.g., via {@link createSession}).
|
|
331
|
+
*/
|
|
332
|
+
sessionId?: string;
|
|
333
|
+
/**
|
|
334
|
+
* Disable default headers from browser emulation. When enabled, only explicitly
|
|
335
|
+
* provided headers will be sent with the request, preventing emulation headers
|
|
336
|
+
* from being automatically added or appended.
|
|
337
|
+
* @default false
|
|
338
|
+
*/
|
|
339
|
+
disableDefaultHeaders?: boolean;
|
|
340
|
+
/**
|
|
341
|
+
* Disable HTTPS certificate verification. When enabled, self-signed and invalid
|
|
342
|
+
* certificates will be accepted.
|
|
343
|
+
* Ignored when `transport` is provided.
|
|
344
|
+
*
|
|
345
|
+
* # Warning
|
|
346
|
+
*
|
|
347
|
+
* You should think very carefully before using this method. If invalid
|
|
348
|
+
* certificates are trusted, *any* certificate for *any* site will be
|
|
349
|
+
* trusted for use. This includes expired certificates. This introduces
|
|
350
|
+
* significant vulnerabilities, and should only be used as a last resort.
|
|
351
|
+
*
|
|
352
|
+
* @default false
|
|
353
|
+
*/
|
|
354
|
+
insecure?: boolean;
|
|
355
|
+
/**
|
|
356
|
+
* Controls which certificate roots are used for TLS verification.
|
|
357
|
+
*
|
|
358
|
+
* - `"combined"` merges OpenSSL/BoringSSL default verify paths with bundled Mozilla roots.
|
|
359
|
+
* - `"mozilla"` uses only the bundled Mozilla roots.
|
|
360
|
+
* - `"defaultPaths"` uses only OpenSSL/BoringSSL default verify paths such as
|
|
361
|
+
* `SSL_CERT_FILE` / `SSL_CERT_DIR` when configured.
|
|
362
|
+
*
|
|
363
|
+
* Note: `"defaultPaths"` is not a native OS trust-store verifier.
|
|
364
|
+
* Ignored when `transport` is provided.
|
|
365
|
+
* @default "combined"
|
|
366
|
+
*/
|
|
367
|
+
trustStore?: TrustStoreMode;
|
|
368
|
+
/**
|
|
369
|
+
* Whether to automatically decompress response bodies. When set to `false`,
|
|
370
|
+
* the raw compressed response body is returned as-is and the `Content-Encoding`
|
|
371
|
+
* header is preserved. Useful for proxy scenarios where the downstream client
|
|
372
|
+
* handles decompression.
|
|
373
|
+
* @default true
|
|
374
|
+
*/
|
|
375
|
+
compress?: boolean;
|
|
376
|
+
/**
|
|
377
|
+
* Optional callback for structured request lifecycle events emitted by the
|
|
378
|
+
* native bridge.
|
|
379
|
+
*/
|
|
380
|
+
onRequestEvent?: (event: RequestEvent) => void;
|
|
381
|
+
/**
|
|
382
|
+
* Capture a final diagnostics payload where supported by the native layer.
|
|
383
|
+
*/
|
|
384
|
+
captureDiagnostics?: boolean;
|
|
331
385
|
}
|
|
332
386
|
/**
|
|
333
387
|
* Configuration for {@link createSession}.
|
|
334
388
|
*/
|
|
335
389
|
interface CreateSessionOptions {
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
390
|
+
/**
|
|
391
|
+
* Provide a custom identifier instead of an auto-generated random ID.
|
|
392
|
+
*/
|
|
393
|
+
sessionId?: string;
|
|
394
|
+
/**
|
|
395
|
+
* Default headers applied to every request made through this session.
|
|
396
|
+
*/
|
|
397
|
+
defaultHeaders?: HeadersInit;
|
|
398
|
+
/**
|
|
399
|
+
* Browser profile to bind to this session. Defaults to 'chrome_142'.
|
|
400
|
+
*/
|
|
401
|
+
browser?: BrowserProfile;
|
|
402
|
+
/**
|
|
403
|
+
* Operating system to bind to this session. Defaults to 'macos'.
|
|
404
|
+
*/
|
|
405
|
+
os?: EmulationOS;
|
|
406
|
+
/**
|
|
407
|
+
* Custom emulation overrides or a standalone custom emulation for the session transport.
|
|
408
|
+
*/
|
|
409
|
+
emulation?: CustomEmulationOptions;
|
|
410
|
+
/**
|
|
411
|
+
* Optional proxy for every request made through the session.
|
|
412
|
+
*/
|
|
413
|
+
proxy?: string;
|
|
414
|
+
/**
|
|
415
|
+
* Default timeout applied when {@link Session.fetch} is called without
|
|
416
|
+
* overriding `timeout`.
|
|
417
|
+
*/
|
|
418
|
+
timeout?: number;
|
|
419
|
+
/**
|
|
420
|
+
* Disable HTTPS certificate verification. When enabled, self-signed and invalid
|
|
421
|
+
* certificates will be accepted for all requests made through this session.
|
|
422
|
+
*
|
|
423
|
+
* # Warning
|
|
424
|
+
*
|
|
425
|
+
* You should think very carefully before using this method. If invalid
|
|
426
|
+
* certificates are trusted, *any* certificate for *any* site will be
|
|
427
|
+
* trusted for use. This includes expired certificates. This introduces
|
|
428
|
+
* significant vulnerabilities, and should only be used as a last resort.
|
|
429
|
+
*
|
|
430
|
+
* @default false
|
|
431
|
+
*/
|
|
432
|
+
insecure?: boolean;
|
|
433
|
+
/**
|
|
434
|
+
* Controls which certificate roots are used for TLS verification for this session.
|
|
435
|
+
* @default "combined"
|
|
436
|
+
*/
|
|
437
|
+
trustStore?: TrustStoreMode;
|
|
438
|
+
/**
|
|
439
|
+
* Enable extra connection/TLS diagnostics for requests made through this session.
|
|
440
|
+
*/
|
|
441
|
+
captureDiagnostics?: boolean;
|
|
379
442
|
}
|
|
380
443
|
/**
|
|
381
444
|
* Configuration for {@link createTransport}.
|
|
382
445
|
*/
|
|
383
446
|
interface CreateTransportOptions {
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
447
|
+
/**
|
|
448
|
+
* Proxy URL to route requests through (e.g., 'http://proxy.example.com:8080').
|
|
449
|
+
*/
|
|
450
|
+
proxy?: string;
|
|
451
|
+
/**
|
|
452
|
+
* Browser profile to impersonate for this transport.
|
|
453
|
+
*/
|
|
454
|
+
browser?: BrowserProfile;
|
|
455
|
+
/**
|
|
456
|
+
* Operating system to emulate for this transport.
|
|
457
|
+
*/
|
|
458
|
+
os?: EmulationOS;
|
|
459
|
+
/**
|
|
460
|
+
* Custom emulation overrides or a standalone custom emulation for this transport.
|
|
461
|
+
*/
|
|
462
|
+
emulation?: CustomEmulationOptions;
|
|
463
|
+
/**
|
|
464
|
+
* Disable HTTPS certificate verification for this transport.
|
|
465
|
+
*/
|
|
466
|
+
insecure?: boolean;
|
|
467
|
+
/**
|
|
468
|
+
* Controls which certificate roots are used for TLS verification for this transport.
|
|
469
|
+
* @default "combined"
|
|
470
|
+
*/
|
|
471
|
+
trustStore?: TrustStoreMode;
|
|
472
|
+
/**
|
|
473
|
+
* Idle timeout for pooled connections (ms).
|
|
474
|
+
*/
|
|
475
|
+
poolIdleTimeout?: number;
|
|
476
|
+
/**
|
|
477
|
+
* Maximum number of idle connections per host.
|
|
478
|
+
*/
|
|
479
|
+
poolMaxIdlePerHost?: number;
|
|
480
|
+
/**
|
|
481
|
+
* Maximum total connections in the pool.
|
|
482
|
+
*/
|
|
483
|
+
poolMaxSize?: number;
|
|
484
|
+
/**
|
|
485
|
+
* TCP connect timeout (ms).
|
|
486
|
+
*/
|
|
487
|
+
connectTimeout?: number;
|
|
488
|
+
/**
|
|
489
|
+
* Read timeout (ms).
|
|
490
|
+
*/
|
|
491
|
+
readTimeout?: number;
|
|
492
|
+
/**
|
|
493
|
+
* Enable extra connection/TLS diagnostics for requests made through this transport.
|
|
494
|
+
*/
|
|
495
|
+
captureDiagnostics?: boolean;
|
|
424
496
|
}
|
|
425
497
|
/**
|
|
426
498
|
* Legacy request options interface. This interface is deprecated and will be removed in a future version.
|
|
@@ -444,106 +516,120 @@ interface CreateTransportOptions {
|
|
|
444
516
|
* ```
|
|
445
517
|
*/
|
|
446
518
|
interface RequestOptions {
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
519
|
+
/**
|
|
520
|
+
* The URL to request.
|
|
521
|
+
*/
|
|
522
|
+
url: string;
|
|
523
|
+
/**
|
|
524
|
+
* Browser profile to impersonate.
|
|
525
|
+
* Applies browser profile behavior handled by the native layer.
|
|
526
|
+
* @default 'chrome_142'
|
|
527
|
+
*/
|
|
528
|
+
browser?: BrowserProfile;
|
|
529
|
+
/**
|
|
530
|
+
* Operating system to emulate.
|
|
531
|
+
* @default 'macos'
|
|
532
|
+
*/
|
|
533
|
+
os?: EmulationOS;
|
|
534
|
+
/**
|
|
535
|
+
* Custom emulation overrides. When `browser` or `os` is present, these fields
|
|
536
|
+
* layer on top of the resolved preset profile. When both are omitted, this
|
|
537
|
+
* switches the request into standalone custom emulation mode.
|
|
538
|
+
*/
|
|
539
|
+
emulation?: CustomEmulationOptions;
|
|
540
|
+
/**
|
|
541
|
+
* HTTP method to use for the request.
|
|
542
|
+
* @default 'GET'
|
|
543
|
+
*/
|
|
544
|
+
method?: string;
|
|
545
|
+
/**
|
|
546
|
+
* Additional headers to send with the request.
|
|
547
|
+
* Browser-specific headers will be automatically added based on the selected browser profile.
|
|
548
|
+
*/
|
|
549
|
+
headers?: Record<string, string> | HeaderTuple[];
|
|
550
|
+
/**
|
|
551
|
+
* Request body data (for POST, PUT, PATCH requests).
|
|
552
|
+
*/
|
|
553
|
+
body?: BodyInit | null;
|
|
554
|
+
/**
|
|
555
|
+
* Transport instance to use for this request. When provided, transport-level
|
|
556
|
+
* options such as `browser`, `os`, `proxy`, and `insecure` must not be set.
|
|
557
|
+
*/
|
|
558
|
+
transport?: Transport;
|
|
559
|
+
/**
|
|
560
|
+
* Proxy URL to route the request through (e.g., 'http://proxy.example.com:8080').
|
|
561
|
+
* Proxy support depends on the native layer and proxy scheme.
|
|
562
|
+
*/
|
|
563
|
+
proxy?: string;
|
|
564
|
+
/**
|
|
565
|
+
* Redirect policy applied to this request. Matches the `redirect` option accepted by {@link fetch}.
|
|
566
|
+
* @default "follow"
|
|
567
|
+
*/
|
|
568
|
+
redirect?: "follow" | "manual" | "error";
|
|
569
|
+
/**
|
|
570
|
+
* Request timeout in milliseconds. If the request takes longer than this value,
|
|
571
|
+
* it will be aborted.
|
|
572
|
+
* @default 30000
|
|
573
|
+
*/
|
|
574
|
+
timeout?: number;
|
|
575
|
+
/**
|
|
576
|
+
* Signal used to abort the request.
|
|
577
|
+
*/
|
|
578
|
+
signal?: AbortSignal | null;
|
|
579
|
+
/**
|
|
580
|
+
* Session instance to bind this request to.
|
|
581
|
+
*/
|
|
582
|
+
session?: Session;
|
|
583
|
+
/**
|
|
584
|
+
* Controls cookie scoping behavior for this request.
|
|
585
|
+
*/
|
|
586
|
+
cookieMode?: CookieMode;
|
|
587
|
+
/**
|
|
588
|
+
* Identifier for the session that should handle this request.
|
|
589
|
+
* @internal
|
|
590
|
+
*/
|
|
591
|
+
sessionId?: string;
|
|
592
|
+
/**
|
|
593
|
+
* Internal flag indicating whether the session should be discarded once the
|
|
594
|
+
* request finishes.
|
|
595
|
+
* @internal
|
|
596
|
+
*/
|
|
597
|
+
ephemeral?: boolean;
|
|
598
|
+
/**
|
|
599
|
+
* Disable default headers from browser emulation. When enabled, only explicitly
|
|
600
|
+
* provided headers will be sent with the request, preventing emulation headers
|
|
601
|
+
* from being automatically added or appended.
|
|
602
|
+
* @default false
|
|
603
|
+
*/
|
|
604
|
+
disableDefaultHeaders?: boolean;
|
|
605
|
+
/**
|
|
606
|
+
* Disable HTTPS certificate verification. When enabled, self-signed and invalid
|
|
607
|
+
* certificates will be accepted.
|
|
608
|
+
*
|
|
609
|
+
* # Warning
|
|
610
|
+
*
|
|
611
|
+
* You should think very carefully before using this method. If invalid
|
|
612
|
+
* certificates are trusted, *any* certificate for *any* site will be
|
|
613
|
+
* trusted for use. This includes expired certificates. This introduces
|
|
614
|
+
* significant vulnerabilities, and should only be used as a last resort.
|
|
615
|
+
*
|
|
616
|
+
* @default false
|
|
617
|
+
*/
|
|
618
|
+
insecure?: boolean;
|
|
619
|
+
/**
|
|
620
|
+
* Controls which certificate roots are used for TLS verification.
|
|
621
|
+
* @default "combined"
|
|
622
|
+
*/
|
|
623
|
+
trustStore?: TrustStoreMode;
|
|
624
|
+
/**
|
|
625
|
+
* Optional callback for structured request lifecycle events emitted by the
|
|
626
|
+
* native bridge.
|
|
627
|
+
*/
|
|
628
|
+
onRequestEvent?: (event: RequestEvent) => void;
|
|
629
|
+
/**
|
|
630
|
+
* Capture a final diagnostics payload where supported by the native layer.
|
|
631
|
+
*/
|
|
632
|
+
captureDiagnostics?: boolean;
|
|
547
633
|
}
|
|
548
634
|
/**
|
|
549
635
|
* Internal response payload returned from the native Rust binding.
|
|
@@ -553,38 +639,42 @@ interface RequestOptions {
|
|
|
553
639
|
* @internal
|
|
554
640
|
*/
|
|
555
641
|
interface NativeResponse {
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
642
|
+
/**
|
|
643
|
+
* HTTP status code (e.g., 200, 404, 500).
|
|
644
|
+
*/
|
|
645
|
+
status: number;
|
|
646
|
+
/**
|
|
647
|
+
* Response headers as [name, value] tuples.
|
|
648
|
+
* Header names are normalized to lowercase.
|
|
649
|
+
*/
|
|
650
|
+
headers: HeaderTuple[];
|
|
651
|
+
/**
|
|
652
|
+
* Handle for streaming response body chunks from the native layer.
|
|
653
|
+
* When `null`, the response does not have a body (e.g., HEAD/204/304).
|
|
654
|
+
*/
|
|
655
|
+
bodyHandle: number | null;
|
|
656
|
+
/**
|
|
657
|
+
* Inline body buffer returned for small payloads. When present, `bodyHandle`
|
|
658
|
+
* will be `null` to avoid a second native round-trip to read the body.
|
|
659
|
+
*/
|
|
660
|
+
bodyBytes: Buffer | null;
|
|
661
|
+
/**
|
|
662
|
+
* Optional Content-Length hint reported by the server after decompression.
|
|
663
|
+
*/
|
|
664
|
+
contentLength: number | null;
|
|
665
|
+
/**
|
|
666
|
+
* Cookies set by the server as [name, value] tuples.
|
|
667
|
+
*/
|
|
668
|
+
cookies: HeaderTuple[];
|
|
669
|
+
/**
|
|
670
|
+
* Final URL after following any redirects.
|
|
671
|
+
* If no redirects occurred, this will match the original request URL.
|
|
672
|
+
*/
|
|
673
|
+
url: string;
|
|
674
|
+
/**
|
|
675
|
+
* Optional diagnostics payload collected by the native layer.
|
|
676
|
+
*/
|
|
677
|
+
diagnostics?: RequestDiagnostics | null;
|
|
588
678
|
}
|
|
589
679
|
/**
|
|
590
680
|
* Configuration options for creating a WebSocket connection.
|
|
@@ -603,83 +693,93 @@ interface NativeResponse {
|
|
|
603
693
|
* ```
|
|
604
694
|
*/
|
|
605
695
|
interface WebSocketOptions {
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
696
|
+
/**
|
|
697
|
+
* Browser profile to impersonate for the WebSocket upgrade request.
|
|
698
|
+
* Automatically applies browser-specific headers and TLS fingerprints.
|
|
699
|
+
* @default 'chrome_142'
|
|
700
|
+
*/
|
|
701
|
+
browser?: BrowserProfile;
|
|
702
|
+
/**
|
|
703
|
+
* Operating system to emulate for the WebSocket handshake.
|
|
704
|
+
* @default 'macos'
|
|
705
|
+
*/
|
|
706
|
+
os?: EmulationOS;
|
|
707
|
+
/**
|
|
708
|
+
* Custom emulation overrides. When `browser` or `os` is present, these fields
|
|
709
|
+
* layer on top of the resolved preset profile. When both are omitted, this
|
|
710
|
+
* switches the handshake into standalone custom emulation mode.
|
|
711
|
+
*/
|
|
712
|
+
emulation?: CustomEmulationOptions;
|
|
713
|
+
/**
|
|
714
|
+
* Additional headers to send with the WebSocket upgrade request.
|
|
715
|
+
* Common headers include Authorization, Origin, or custom application headers.
|
|
716
|
+
*/
|
|
717
|
+
headers?: HeadersInit;
|
|
718
|
+
/**
|
|
719
|
+
* Proxy URL to route the connection through (e.g., 'http://proxy.example.com:8080').
|
|
720
|
+
* Proxy support depends on the native layer and proxy scheme.
|
|
721
|
+
*/
|
|
722
|
+
proxy?: string;
|
|
723
|
+
/**
|
|
724
|
+
* Optional subprotocols for compatibility with the WHATWG WebSocket constructor.
|
|
725
|
+
* Values are validated for non-empty, unique entries and sent in
|
|
726
|
+
* the `Sec-WebSocket-Protocol` handshake header.
|
|
727
|
+
*/
|
|
728
|
+
protocols?: string | string[];
|
|
729
|
+
/**
|
|
730
|
+
* Maximum size in bytes for a single incoming WebSocket frame.
|
|
731
|
+
* Increase this when the peer sends large unfragmented frames.
|
|
732
|
+
*/
|
|
733
|
+
maxFrameSize?: number;
|
|
734
|
+
/**
|
|
735
|
+
* Maximum size in bytes for a complete incoming WebSocket message.
|
|
736
|
+
* Increase this when the peer sends very large fragmented messages.
|
|
737
|
+
*/
|
|
738
|
+
maxMessageSize?: number;
|
|
739
|
+
/**
|
|
740
|
+
* Controls the binary payload type exposed via `MessageEvent.data`.
|
|
741
|
+
* - "nodebuffer": delivers Node.js Buffer instances (default)
|
|
742
|
+
* - "arraybuffer": delivers ArrayBuffer instances
|
|
743
|
+
* - "blob": delivers Blob instances
|
|
744
|
+
*/
|
|
745
|
+
binaryType?: WebSocketBinaryType;
|
|
646
746
|
}
|
|
647
747
|
interface LegacyWebSocketOptions extends WebSocketOptions {
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
748
|
+
/**
|
|
749
|
+
* @deprecated Use `websocket(url, options)` or `new WebSocket(...)`.
|
|
750
|
+
*/
|
|
751
|
+
url: string;
|
|
752
|
+
/**
|
|
753
|
+
* @deprecated Use `onmessage` or `addEventListener("message", ...)`.
|
|
754
|
+
*/
|
|
755
|
+
onMessage?: (data: string | Buffer) => void;
|
|
756
|
+
/**
|
|
757
|
+
* @deprecated Use `onclose` or `addEventListener("close", ...)`.
|
|
758
|
+
*/
|
|
759
|
+
onClose?: (event: WebSocketCloseEvent) => void;
|
|
760
|
+
/**
|
|
761
|
+
* @deprecated Use `onerror` or `addEventListener("error", ...)`.
|
|
762
|
+
*/
|
|
763
|
+
onError?: (error: string) => void;
|
|
664
764
|
}
|
|
665
765
|
type SessionWebSocketOptions = Omit<WebSocketOptions, "browser" | "os" | "proxy" | "emulation">;
|
|
666
766
|
interface LegacySessionWebSocketOptions extends SessionWebSocketOptions {
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
767
|
+
/**
|
|
768
|
+
* @deprecated Use `session.websocket(url, options)`.
|
|
769
|
+
*/
|
|
770
|
+
url: string;
|
|
771
|
+
/**
|
|
772
|
+
* @deprecated Use `onmessage` or `addEventListener("message", ...)`.
|
|
773
|
+
*/
|
|
774
|
+
onMessage?: (data: string | Buffer) => void;
|
|
775
|
+
/**
|
|
776
|
+
* @deprecated Use `onclose` or `addEventListener("close", ...)`.
|
|
777
|
+
*/
|
|
778
|
+
onClose?: (event: WebSocketCloseEvent) => void;
|
|
779
|
+
/**
|
|
780
|
+
* @deprecated Use `onerror` or `addEventListener("error", ...)`.
|
|
781
|
+
*/
|
|
782
|
+
onError?: (error: string) => void;
|
|
683
783
|
}
|
|
684
784
|
/**
|
|
685
785
|
* Internal WebSocket connection object returned from the native Rust binding.
|
|
@@ -689,22 +789,22 @@ interface LegacySessionWebSocketOptions extends SessionWebSocketOptions {
|
|
|
689
789
|
* @internal
|
|
690
790
|
*/
|
|
691
791
|
interface NativeWebSocketConnection {
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
792
|
+
/**
|
|
793
|
+
* Unique identifier for this WebSocket connection.
|
|
794
|
+
* Used internally to track and manage the connection.
|
|
795
|
+
* @internal
|
|
796
|
+
*/
|
|
797
|
+
_id: number;
|
|
798
|
+
/**
|
|
799
|
+
* Selected subprotocol returned by the server, when present.
|
|
800
|
+
* @internal
|
|
801
|
+
*/
|
|
802
|
+
protocol?: string;
|
|
803
|
+
/**
|
|
804
|
+
* Negotiated extension string returned by the server, when present.
|
|
805
|
+
* @internal
|
|
806
|
+
*/
|
|
807
|
+
extensions?: string;
|
|
708
808
|
}
|
|
709
809
|
/**
|
|
710
810
|
* Error thrown when a request fails. This can occur due to network errors,
|
|
@@ -722,138 +822,143 @@ interface NativeWebSocketConnection {
|
|
|
722
822
|
* ```
|
|
723
823
|
*/
|
|
724
824
|
declare class RequestError extends TypeError {
|
|
725
|
-
|
|
825
|
+
constructor(message: string);
|
|
726
826
|
}
|
|
727
|
-
|
|
827
|
+
//#endregion
|
|
828
|
+
//#region src/wreq-js.d.ts
|
|
728
829
|
interface NativeWebSocketCloseEvent {
|
|
729
|
-
|
|
730
|
-
|
|
830
|
+
code: number;
|
|
831
|
+
reason: string;
|
|
731
832
|
}
|
|
732
833
|
type SessionDefaults = {
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
834
|
+
transportMode: ResolvedEmulationMode;
|
|
835
|
+
proxy?: string;
|
|
836
|
+
timeout?: number;
|
|
837
|
+
insecure?: boolean;
|
|
838
|
+
trustStore?: TrustStoreMode;
|
|
839
|
+
defaultHeaders?: HeaderTuple[];
|
|
840
|
+
captureDiagnostics?: boolean;
|
|
841
|
+
transportId?: string;
|
|
842
|
+
ownsTransport?: boolean;
|
|
740
843
|
};
|
|
741
844
|
type PresetEmulationMode = {
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
845
|
+
kind: "preset";
|
|
846
|
+
browser: BrowserProfile;
|
|
847
|
+
os: EmulationOS;
|
|
848
|
+
emulationJson?: string;
|
|
746
849
|
};
|
|
747
850
|
type CustomEmulationMode = {
|
|
748
|
-
|
|
749
|
-
|
|
851
|
+
kind: "custom";
|
|
852
|
+
emulationJson: string;
|
|
750
853
|
};
|
|
751
854
|
type ResolvedEmulationMode = PresetEmulationMode | CustomEmulationMode;
|
|
752
855
|
type LegacyWebSocketCallbacks = {
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
856
|
+
onMessage?: (data: string | Buffer) => void;
|
|
857
|
+
onClose?: (event: WebSocketCloseEvent) => void;
|
|
858
|
+
onError?: (error: string) => void;
|
|
756
859
|
};
|
|
757
860
|
type WebSocketOpenDispatchMode = "automatic" | "deferred";
|
|
758
861
|
type InternalWebSocketInit = {
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
862
|
+
readonly _internal: true;
|
|
863
|
+
url: string;
|
|
864
|
+
options: WebSocketOptions;
|
|
865
|
+
openDispatchMode: WebSocketOpenDispatchMode;
|
|
866
|
+
connect: (callbacks: {
|
|
867
|
+
onMessage: (data: string | Buffer) => void;
|
|
868
|
+
onClose: (event: NativeWebSocketCloseEvent) => void;
|
|
869
|
+
onError: (message: string) => void;
|
|
870
|
+
}) => Promise<NativeWebSocketConnection>;
|
|
871
|
+
legacyCallbacks: LegacyWebSocketCallbacks | undefined;
|
|
769
872
|
};
|
|
770
873
|
declare class Headers implements Iterable<[string, string]> {
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
874
|
+
private readonly store;
|
|
875
|
+
constructor(init?: HeadersInit);
|
|
876
|
+
private applyInit;
|
|
877
|
+
private normalizeName;
|
|
878
|
+
private assertValue;
|
|
879
|
+
append(name: string, value: unknown): void;
|
|
880
|
+
set(name: string, value: unknown): void;
|
|
881
|
+
get(name: string): string | null;
|
|
882
|
+
has(name: string): boolean;
|
|
883
|
+
delete(name: string): void;
|
|
884
|
+
entries(): IterableIterator<[string, string]>;
|
|
885
|
+
keys(): IterableIterator<string>;
|
|
886
|
+
values(): IterableIterator<string>;
|
|
887
|
+
forEach(callback: (value: string, name: string, parent: Headers) => void, thisArg?: unknown): void;
|
|
888
|
+
[Symbol.iterator](): IterableIterator<[string, string]>;
|
|
889
|
+
toObject(): Record<string, string>;
|
|
890
|
+
toTuples(): HeaderTuple[];
|
|
788
891
|
}
|
|
789
892
|
type ResponseType = "basic" | "cors" | "error" | "opaque" | "opaqueredirect";
|
|
790
893
|
declare class Response {
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
894
|
+
readonly status: number;
|
|
895
|
+
readonly ok: boolean;
|
|
896
|
+
readonly contentLength: number | null;
|
|
897
|
+
readonly url: string;
|
|
898
|
+
readonly diagnostics: RequestDiagnostics | null;
|
|
899
|
+
readonly type: ResponseType;
|
|
900
|
+
bodyUsed: boolean;
|
|
901
|
+
private readonly payload;
|
|
902
|
+
private readonly requestUrl;
|
|
903
|
+
private redirectedMemo;
|
|
904
|
+
private readonly headersInit;
|
|
905
|
+
private headersInstance;
|
|
906
|
+
private readonly cookiesInit;
|
|
907
|
+
private cookiesRecord;
|
|
908
|
+
private inlineBody;
|
|
909
|
+
private bodySource;
|
|
910
|
+
private bodyStream;
|
|
911
|
+
private nativeHandleAvailable;
|
|
912
|
+
private nativeHandle;
|
|
913
|
+
constructor(payload: NativeResponse, requestUrl: string, bodySource?: ReadableStream<Uint8Array> | null);
|
|
914
|
+
get redirected(): boolean;
|
|
915
|
+
get statusText(): string;
|
|
916
|
+
get headers(): Headers;
|
|
917
|
+
get cookies(): Record<string, string | string[]>;
|
|
918
|
+
get body(): ReadableStream<Uint8Array> | null;
|
|
919
|
+
json<T = unknown>(): Promise<T>;
|
|
920
|
+
arrayBuffer(): Promise<ArrayBuffer>;
|
|
921
|
+
text(): Promise<string>;
|
|
922
|
+
blob(): Promise<Blob>;
|
|
923
|
+
formData(): Promise<FormData>;
|
|
924
|
+
readable(): Readable;
|
|
925
|
+
clone(): Response;
|
|
926
|
+
private assertBodyAvailable;
|
|
927
|
+
private consumeBody;
|
|
824
928
|
}
|
|
825
929
|
declare class Transport {
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
930
|
+
readonly id: string;
|
|
931
|
+
private disposed;
|
|
932
|
+
constructor(id: string);
|
|
933
|
+
get closed(): boolean;
|
|
934
|
+
close(): Promise<void>;
|
|
831
935
|
}
|
|
832
936
|
declare class Session implements SessionHandle {
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
937
|
+
readonly id: string;
|
|
938
|
+
private disposed;
|
|
939
|
+
private readonly defaults;
|
|
940
|
+
constructor(id: string, defaults: SessionDefaults);
|
|
941
|
+
get closed(): boolean;
|
|
942
|
+
private ensureActive;
|
|
943
|
+
/** @internal */
|
|
944
|
+
getDefaults(): SessionDefaults;
|
|
945
|
+
/** @internal */
|
|
946
|
+
_defaultsRef(): SessionDefaults;
|
|
947
|
+
fetch(input: string | URL | Request, init?: RequestInit): Promise<Response>;
|
|
948
|
+
clearCookies(): Promise<void>;
|
|
949
|
+
getCookies(url: string | URL): Record<string, string>;
|
|
950
|
+
getAllCookies(): SessionCookie[];
|
|
951
|
+
setCookie(name: string, value: string, url: string | URL): void;
|
|
952
|
+
/**
|
|
953
|
+
* Create a WebSocket connection that shares this session's cookies and TLS configuration.
|
|
954
|
+
*
|
|
955
|
+
* @param urlOrOptions - WebSocket URL or legacy options object
|
|
956
|
+
* @param options - Session WebSocket options
|
|
957
|
+
* @returns Promise that resolves to the WebSocket instance
|
|
958
|
+
*/
|
|
959
|
+
websocket(url: string | URL, options?: SessionWebSocketOptions): Promise<WebSocket>;
|
|
960
|
+
websocket(options: LegacySessionWebSocketOptions): Promise<WebSocket>;
|
|
961
|
+
close(): Promise<void>;
|
|
857
962
|
}
|
|
858
963
|
/**
|
|
859
964
|
* Fetch-compatible entry point that adds browser impersonation controls.
|
|
@@ -923,119 +1028,119 @@ declare function get(url: string | URL | Request, init?: Omit<RequestInit, "meth
|
|
|
923
1028
|
*/
|
|
924
1029
|
declare function post(url: string | URL | Request, body?: BodyInit | null, init?: Omit<RequestInit, "method" | "body">): Promise<Response>;
|
|
925
1030
|
type WebSocketAddEventListenerOptions = boolean | {
|
|
926
|
-
|
|
927
|
-
|
|
1031
|
+
once?: boolean;
|
|
1032
|
+
signal?: AbortSignal | null;
|
|
928
1033
|
};
|
|
929
1034
|
/**
|
|
930
1035
|
* WHATWG-style WebSocket API with async connection establishment.
|
|
931
1036
|
*/
|
|
932
1037
|
declare class WebSocket {
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1038
|
+
static readonly CONNECTING = 0;
|
|
1039
|
+
static readonly OPEN = 1;
|
|
1040
|
+
static readonly CLOSING = 2;
|
|
1041
|
+
static readonly CLOSED = 3;
|
|
1042
|
+
readonly url: string;
|
|
1043
|
+
protocol: string;
|
|
1044
|
+
extensions: string;
|
|
1045
|
+
readyState: number;
|
|
1046
|
+
private _binaryType;
|
|
1047
|
+
private _bufferedAmount;
|
|
1048
|
+
private _onopen;
|
|
1049
|
+
private _onmessage;
|
|
1050
|
+
private _onclose;
|
|
1051
|
+
private _onerror;
|
|
1052
|
+
private _onHandlerOrder;
|
|
1053
|
+
private _listenerOrderCounter;
|
|
1054
|
+
private readonly _listeners;
|
|
1055
|
+
private readonly _legacyCallbacks;
|
|
1056
|
+
private readonly _openDispatchMode;
|
|
1057
|
+
private _connection;
|
|
1058
|
+
private _connectPromise;
|
|
1059
|
+
private _closeOptions;
|
|
1060
|
+
private _finalizerToken;
|
|
1061
|
+
private _openEventDispatched;
|
|
1062
|
+
private _openEventQueued;
|
|
1063
|
+
private _closeEventDispatched;
|
|
1064
|
+
private _nativeCloseStarted;
|
|
1065
|
+
private _pendingMessages;
|
|
1066
|
+
private _sendChain;
|
|
1067
|
+
constructor(init: InternalWebSocketInit);
|
|
1068
|
+
constructor(url: string | URL, protocols?: string | string[]);
|
|
1069
|
+
constructor(url: string | URL, protocols?: string | string[], options?: WebSocketOptions);
|
|
1070
|
+
constructor(url: string | URL, options?: WebSocketOptions);
|
|
1071
|
+
get binaryType(): WebSocketBinaryType;
|
|
1072
|
+
set binaryType(value: WebSocketBinaryType);
|
|
1073
|
+
get bufferedAmount(): number;
|
|
1074
|
+
get onopen(): ((this: WebSocket, event: WebSocketOpenEvent) => void) | null;
|
|
1075
|
+
set onopen(listener: ((this: WebSocket, event: WebSocketOpenEvent) => void) | null);
|
|
1076
|
+
get onmessage(): ((this: WebSocket, event: WebSocketMessageEvent) => void) | null;
|
|
1077
|
+
set onmessage(listener: ((this: WebSocket, event: WebSocketMessageEvent) => void) | null);
|
|
1078
|
+
get onclose(): ((this: WebSocket, event: WebSocketCloseEvent) => void) | null;
|
|
1079
|
+
set onclose(listener: ((this: WebSocket, event: WebSocketCloseEvent) => void) | null);
|
|
1080
|
+
get onerror(): ((this: WebSocket, event: WebSocketErrorEvent) => void) | null;
|
|
1081
|
+
set onerror(listener: ((this: WebSocket, event: WebSocketErrorEvent) => void) | null);
|
|
1082
|
+
static _connectWithInit(init: InternalWebSocketInit): Promise<WebSocket>;
|
|
1083
|
+
private static buildStandaloneInit;
|
|
1084
|
+
private connect;
|
|
1085
|
+
private _waitUntilConnected;
|
|
1086
|
+
private scheduleOpenEventAfterConnect;
|
|
1087
|
+
private scheduleOpenEventAfterAwait;
|
|
1088
|
+
private scheduleOpenEventWithDepth;
|
|
1089
|
+
private releaseConnectionTracking;
|
|
1090
|
+
private toMessageEventData;
|
|
1091
|
+
private invokeListener;
|
|
1092
|
+
private createBaseEvent;
|
|
1093
|
+
private getOnHandler;
|
|
1094
|
+
private getOnHandlerOrder;
|
|
1095
|
+
private getListenerMap;
|
|
1096
|
+
private dispatchEvent;
|
|
1097
|
+
private dispatchOpenEvent;
|
|
1098
|
+
private dispatchMessageEvent;
|
|
1099
|
+
private dispatchCloseEvent;
|
|
1100
|
+
private dispatchErrorEvent;
|
|
1101
|
+
private handleNativeMessage;
|
|
1102
|
+
private handleNativeError;
|
|
1103
|
+
private handleNativeClose;
|
|
1104
|
+
private finalizeClosed;
|
|
1105
|
+
private startNativeClose;
|
|
1106
|
+
addEventListener(type: "open", listener: ((event: WebSocketOpenEvent) => void) | null, options?: WebSocketAddEventListenerOptions): void;
|
|
1107
|
+
addEventListener(type: "message", listener: ((event: WebSocketMessageEvent) => void) | null, options?: WebSocketAddEventListenerOptions): void;
|
|
1108
|
+
addEventListener(type: "close", listener: ((event: WebSocketCloseEvent) => void) | null, options?: WebSocketAddEventListenerOptions): void;
|
|
1109
|
+
addEventListener(type: "error", listener: ((event: WebSocketErrorEvent) => void) | null, options?: WebSocketAddEventListenerOptions): void;
|
|
1110
|
+
addEventListener(type: string, listener: unknown, options?: WebSocketAddEventListenerOptions): void;
|
|
1111
|
+
removeEventListener(type: "open", listener: ((event: WebSocketOpenEvent) => void) | null): void;
|
|
1112
|
+
removeEventListener(type: "message", listener: ((event: WebSocketMessageEvent) => void) | null): void;
|
|
1113
|
+
removeEventListener(type: "close", listener: ((event: WebSocketCloseEvent) => void) | null): void;
|
|
1114
|
+
removeEventListener(type: "error", listener: ((event: WebSocketErrorEvent) => void) | null): void;
|
|
1115
|
+
removeEventListener(type: string, listener: unknown): void;
|
|
1116
|
+
private getSendByteLength;
|
|
1117
|
+
private normalizeSendPayload;
|
|
1118
|
+
send(data: string | Buffer | ArrayBuffer | ArrayBufferView | Blob): void;
|
|
1119
|
+
close(code?: number, reason?: string): void;
|
|
1015
1120
|
}
|
|
1016
1121
|
/**
|
|
1017
1122
|
* Create a WebSocket connection with browser impersonation.
|
|
1018
1123
|
*/
|
|
1019
1124
|
declare function websocket(url: string | URL, options?: WebSocketOptions): Promise<WebSocket>;
|
|
1020
1125
|
declare function websocket(options: LegacyWebSocketOptions): Promise<WebSocket>;
|
|
1021
|
-
|
|
1022
1126
|
declare const _default: {
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1127
|
+
fetch: typeof fetch;
|
|
1128
|
+
request: typeof request;
|
|
1129
|
+
get: typeof get;
|
|
1130
|
+
post: typeof post;
|
|
1131
|
+
getProfiles: typeof getProfiles;
|
|
1132
|
+
getOperatingSystems: typeof getOperatingSystems;
|
|
1133
|
+
createTransport: typeof createTransport;
|
|
1134
|
+
createSession: typeof createSession;
|
|
1135
|
+
withSession: typeof withSession;
|
|
1136
|
+
websocket: typeof websocket;
|
|
1137
|
+
WebSocket: typeof WebSocket;
|
|
1138
|
+
Headers: typeof Headers;
|
|
1139
|
+
Response: typeof Response;
|
|
1140
|
+
Transport: typeof Transport;
|
|
1141
|
+
Session: typeof Session;
|
|
1142
|
+
RequestError: typeof RequestError;
|
|
1039
1143
|
};
|
|
1040
|
-
|
|
1041
|
-
export { type AlpnProtocol, type AlpsProtocol, type BodyInit, type BrowserProfile, type CookieMode, type CreateSessionOptions, type CreateTransportOptions, type CustomEmulationOptions, type CustomHttp1Options, type CustomHttp2Options, type CustomTlsOptions, type EmulationOS, Headers, type HeadersInit, type Http2ExperimentalSetting, type Http2Priority, type Http2PseudoHeaderId, type Http2SettingId, type Http2StreamDependency, RequestError, type RequestInit, type RequestOptions, Response, Session, type SessionHandle, type SessionWebSocketOptions, type TlsVersion, Transport, WebSocket, type WebSocketBinaryType, type WebSocketCloseEvent, type WebSocketErrorEvent, type WebSocketEventType, type WebSocketMessageEvent, type WebSocketOpenEvent, type WebSocketOptions, createSession, createTransport, _default as default, fetch, get, getOperatingSystems, getProfiles, post, request, websocket, withSession };
|
|
1144
|
+
//#endregion
|
|
1145
|
+
export { type AlpnProtocol, type AlpsProtocol, type BodyInit, type BrowserProfile, type CookieMode, type CreateSessionOptions, type CreateTransportOptions, type CustomEmulationOptions, type CustomHttp1Options, type CustomHttp2Options, type CustomTlsOptions, type EmulationOS, Headers, type HeadersInit, type Http2ExperimentalSetting, type Http2Priority, type Http2PseudoHeaderId, type Http2SettingId, type Http2StreamDependency, type RequestDiagnostics, RequestError, type RequestEvent, type RequestEventType, type RequestInit, type RequestOptions, Response, Session, type SessionHandle, type SessionWebSocketOptions, type TlsVersion, Transport, WebSocket, type WebSocketBinaryType, type WebSocketCloseEvent, type WebSocketErrorEvent, type WebSocketEventType, type WebSocketMessageEvent, type WebSocketOpenEvent, type WebSocketOptions, createSession, createTransport, _default as default, fetch, get, getOperatingSystems, getProfiles, post, request, websocket, withSession };
|
|
1146
|
+
//# sourceMappingURL=wreq-js.d.ts.map
|