@aligent/cdk-prerender-proxy 0.2.4 → 0.2.5-beta
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/lib/handlers/cache-control.ts +7 -20
- package/lib/handlers/error-response.ts +8 -51
- package/lib/handlers/node_modules/.package-lock.json +32 -3
- package/lib/handlers/node_modules/@aligent/cdk-lambda-at-edge-handlers/index.d.ts +6 -0
- package/lib/handlers/node_modules/@aligent/cdk-lambda-at-edge-handlers/index.js +14 -0
- package/lib/handlers/node_modules/@aligent/cdk-lambda-at-edge-handlers/lib/cache-control.d.ts +3 -0
- package/lib/handlers/node_modules/@aligent/cdk-lambda-at-edge-handlers/lib/cache-control.js +24 -0
- package/lib/handlers/node_modules/@aligent/cdk-lambda-at-edge-handlers/lib/error-response.d.ts +3 -0
- package/lib/handlers/node_modules/@aligent/cdk-lambda-at-edge-handlers/lib/error-response.js +50 -0
- package/lib/handlers/node_modules/@aligent/cdk-lambda-at-edge-handlers/lib/prerender-check.d.ts +3 -0
- package/lib/handlers/node_modules/@aligent/cdk-lambda-at-edge-handlers/lib/prerender-check.js +28 -0
- package/lib/handlers/node_modules/@aligent/cdk-lambda-at-edge-handlers/lib/prerender.d.ts +3 -0
- package/lib/handlers/node_modules/@aligent/cdk-lambda-at-edge-handlers/lib/prerender.js +49 -0
- package/lib/handlers/node_modules/@aligent/cdk-lambda-at-edge-handlers/lib/redirect.d.ts +3 -0
- package/lib/handlers/node_modules/@aligent/cdk-lambda-at-edge-handlers/lib/redirect.js +33 -0
- package/lib/handlers/node_modules/@aligent/cdk-lambda-at-edge-handlers/package.json +27 -0
- package/lib/handlers/node_modules/@aligent/cdk-lambda-at-edge-handlers/tsconfig.json +3 -0
- package/lib/handlers/node_modules/@middy/core/LICENSE +21 -0
- package/lib/handlers/node_modules/@middy/core/README.md +65 -0
- package/lib/handlers/node_modules/@middy/core/index.cjs +207 -0
- package/lib/handlers/node_modules/@middy/core/index.d.ts +91 -0
- package/lib/handlers/node_modules/@middy/core/index.js +199 -0
- package/lib/handlers/node_modules/@middy/core/package.json +65 -0
- package/lib/handlers/node_modules/@types/node/README.md +4 -4
- package/lib/handlers/node_modules/@types/node/assert/strict.d.ts +5 -1
- package/lib/handlers/node_modules/@types/node/assert.d.ts +904 -67
- package/lib/handlers/node_modules/@types/node/async_hooks.d.ts +371 -96
- package/lib/handlers/node_modules/@types/node/buffer.d.ts +2199 -25
- package/lib/handlers/node_modules/@types/node/child_process.d.ts +1151 -308
- package/lib/handlers/node_modules/@types/node/cluster.d.ts +356 -208
- package/lib/handlers/node_modules/@types/node/console.d.ts +324 -45
- package/lib/handlers/node_modules/@types/node/constants.d.ts +8 -3
- package/lib/handlers/node_modules/@types/node/crypto.d.ts +3230 -846
- package/lib/handlers/node_modules/@types/node/dgram.d.ts +478 -74
- package/lib/handlers/node_modules/@types/node/diagnostics_channel.d.ts +153 -0
- package/lib/handlers/node_modules/@types/node/dns/promises.d.ts +308 -35
- package/lib/handlers/node_modules/@types/node/dns.d.ts +444 -107
- package/lib/handlers/node_modules/@types/node/dom-events.d.ts +126 -0
- package/lib/handlers/node_modules/@types/node/domain.d.ts +162 -16
- package/lib/handlers/node_modules/@types/node/events.d.ts +624 -39
- package/lib/handlers/node_modules/@types/node/fs/promises.d.ts +911 -365
- package/lib/handlers/node_modules/@types/node/fs.d.ts +2611 -978
- package/lib/handlers/node_modules/@types/node/globals.d.ts +66 -421
- package/lib/handlers/node_modules/@types/node/globals.global.d.ts +1 -1
- package/lib/handlers/node_modules/@types/node/http.d.ts +1416 -199
- package/lib/handlers/node_modules/@types/node/http2.d.ts +1688 -530
- package/lib/handlers/node_modules/@types/node/https.d.ts +532 -26
- package/lib/handlers/node_modules/@types/node/index.d.ts +92 -16
- package/lib/handlers/node_modules/@types/node/inspector.d.ts +511 -811
- package/lib/handlers/node_modules/@types/node/module.d.ts +75 -13
- package/lib/handlers/node_modules/@types/node/net.d.ts +710 -167
- package/lib/handlers/node_modules/@types/node/os.d.ts +252 -25
- package/lib/handlers/node_modules/@types/node/package.json +30 -25
- package/lib/handlers/node_modules/@types/node/path.d.ts +59 -31
- package/lib/handlers/node_modules/@types/node/perf_hooks.d.ts +420 -105
- package/lib/handlers/node_modules/@types/node/process.d.ts +1249 -228
- package/lib/handlers/node_modules/@types/node/punycode.d.ts +67 -25
- package/lib/handlers/node_modules/@types/node/querystring.d.ts +113 -10
- package/lib/handlers/node_modules/@types/node/readline/promises.d.ts +143 -0
- package/lib/handlers/node_modules/@types/node/readline.d.ts +570 -109
- package/lib/handlers/node_modules/@types/node/repl.d.ts +154 -125
- package/lib/handlers/node_modules/@types/node/stream/consumers.d.ts +12 -0
- package/lib/handlers/node_modules/@types/node/stream/promises.d.ts +18 -43
- package/lib/handlers/node_modules/@types/node/stream/web.d.ts +330 -0
- package/lib/handlers/node_modules/@types/node/stream.d.ts +1117 -248
- package/lib/handlers/node_modules/@types/node/string_decoder.d.ts +60 -0
- package/lib/handlers/node_modules/@types/node/test.d.ts +446 -0
- package/lib/handlers/node_modules/@types/node/timers/promises.d.ts +81 -9
- package/lib/handlers/node_modules/@types/node/timers.d.ts +84 -17
- package/lib/handlers/node_modules/@types/node/tls.d.ts +510 -275
- package/lib/handlers/node_modules/@types/node/trace_events.d.ts +120 -10
- package/lib/handlers/node_modules/@types/node/ts4.8/assert/strict.d.ts +8 -0
- package/lib/handlers/node_modules/@types/node/ts4.8/assert.d.ts +961 -0
- package/lib/handlers/node_modules/@types/node/ts4.8/async_hooks.d.ts +501 -0
- package/lib/handlers/node_modules/@types/node/ts4.8/buffer.d.ts +2259 -0
- package/lib/handlers/node_modules/@types/node/ts4.8/child_process.d.ts +1369 -0
- package/lib/handlers/node_modules/@types/node/ts4.8/cluster.d.ts +410 -0
- package/lib/handlers/node_modules/@types/node/ts4.8/console.d.ts +412 -0
- package/lib/handlers/node_modules/@types/node/ts4.8/constants.d.ts +18 -0
- package/lib/handlers/node_modules/@types/node/ts4.8/crypto.d.ts +3964 -0
- package/lib/handlers/node_modules/@types/node/ts4.8/dgram.d.ts +545 -0
- package/lib/handlers/node_modules/@types/node/ts4.8/diagnostics_channel.d.ts +153 -0
- package/lib/handlers/node_modules/@types/node/ts4.8/dns/promises.d.ts +370 -0
- package/lib/handlers/node_modules/@types/node/ts4.8/dns.d.ts +659 -0
- package/lib/handlers/node_modules/@types/node/ts4.8/dom-events.d.ts +126 -0
- package/lib/handlers/node_modules/@types/node/ts4.8/domain.d.ts +170 -0
- package/lib/handlers/node_modules/@types/node/ts4.8/events.d.ts +678 -0
- package/lib/handlers/node_modules/@types/node/ts4.8/fs/promises.d.ts +1138 -0
- package/lib/handlers/node_modules/@types/node/ts4.8/fs.d.ts +3872 -0
- package/lib/handlers/node_modules/@types/node/ts4.8/globals.d.ts +294 -0
- package/lib/handlers/node_modules/@types/node/ts4.8/globals.global.d.ts +1 -0
- package/lib/handlers/node_modules/@types/node/ts4.8/http.d.ts +1651 -0
- package/lib/handlers/node_modules/@types/node/ts4.8/http2.d.ts +2134 -0
- package/lib/handlers/node_modules/@types/node/ts4.8/https.d.ts +542 -0
- package/lib/handlers/node_modules/@types/node/ts4.8/index.d.ts +88 -0
- package/lib/handlers/node_modules/@types/node/ts4.8/inspector.d.ts +2741 -0
- package/lib/handlers/node_modules/@types/node/ts4.8/module.d.ts +114 -0
- package/lib/handlers/node_modules/@types/node/ts4.8/net.d.ts +869 -0
- package/lib/handlers/node_modules/@types/node/ts4.8/os.d.ts +466 -0
- package/lib/handlers/node_modules/@types/node/ts4.8/path.d.ts +191 -0
- package/lib/handlers/node_modules/@types/node/ts4.8/perf_hooks.d.ts +625 -0
- package/lib/handlers/node_modules/@types/node/ts4.8/process.d.ts +1482 -0
- package/lib/handlers/node_modules/@types/node/ts4.8/punycode.d.ts +117 -0
- package/lib/handlers/node_modules/@types/node/ts4.8/querystring.d.ts +131 -0
- package/lib/handlers/node_modules/@types/node/ts4.8/readline/promises.d.ts +143 -0
- package/lib/handlers/node_modules/@types/node/ts4.8/readline.d.ts +653 -0
- package/lib/handlers/node_modules/@types/node/ts4.8/repl.d.ts +424 -0
- package/lib/handlers/node_modules/@types/node/ts4.8/stream/consumers.d.ts +12 -0
- package/lib/handlers/node_modules/@types/node/ts4.8/stream/promises.d.ts +42 -0
- package/lib/handlers/node_modules/@types/node/ts4.8/stream/web.d.ts +330 -0
- package/lib/handlers/node_modules/@types/node/ts4.8/stream.d.ts +1340 -0
- package/lib/handlers/node_modules/@types/node/ts4.8/string_decoder.d.ts +67 -0
- package/lib/handlers/node_modules/@types/node/ts4.8/test.d.ts +446 -0
- package/lib/handlers/node_modules/@types/node/ts4.8/timers/promises.d.ts +93 -0
- package/lib/handlers/node_modules/@types/node/ts4.8/timers.d.ts +94 -0
- package/lib/handlers/node_modules/@types/node/ts4.8/tls.d.ts +1028 -0
- package/lib/handlers/node_modules/@types/node/ts4.8/trace_events.d.ts +171 -0
- package/lib/handlers/node_modules/@types/node/ts4.8/tty.d.ts +206 -0
- package/lib/handlers/node_modules/@types/node/ts4.8/url.d.ts +897 -0
- package/lib/handlers/node_modules/@types/node/ts4.8/util.d.ts +1926 -0
- package/lib/handlers/node_modules/@types/node/ts4.8/v8.d.ts +396 -0
- package/lib/handlers/node_modules/@types/node/ts4.8/vm.d.ts +509 -0
- package/lib/handlers/node_modules/@types/node/ts4.8/wasi.d.ts +158 -0
- package/lib/handlers/node_modules/@types/node/ts4.8/worker_threads.d.ts +689 -0
- package/lib/handlers/node_modules/@types/node/ts4.8/zlib.d.ts +517 -0
- package/lib/handlers/node_modules/@types/node/tty.d.ts +163 -23
- package/lib/handlers/node_modules/@types/node/url.d.ts +825 -44
- package/lib/handlers/node_modules/@types/node/util.d.ts +1842 -72
- package/lib/handlers/node_modules/@types/node/v8.d.ts +276 -78
- package/lib/handlers/node_modules/@types/node/vm.d.ts +410 -53
- package/lib/handlers/node_modules/@types/node/wasi.d.ts +102 -30
- package/lib/handlers/node_modules/@types/node/worker_threads.d.ts +559 -152
- package/lib/handlers/node_modules/@types/node/zlib.d.ts +234 -78
- package/lib/handlers/node_modules/esbuild/README.md +3 -0
- package/lib/handlers/node_modules/esbuild/bin/esbuild +0 -0
- package/lib/handlers/node_modules/esbuild/install.js +256 -0
- package/lib/handlers/node_modules/esbuild/lib/main.d.ts +397 -0
- package/lib/handlers/node_modules/esbuild/lib/main.js +1939 -0
- package/lib/handlers/node_modules/esbuild/package.json +15 -0
- package/lib/handlers/package-lock.json +62 -6
- package/lib/handlers/package.json +6 -1
- package/lib/handlers/prerender-check.ts +8 -27
- package/lib/handlers/prerender.ts +8 -43
- package/package.json +1 -1
- package/lib/handlers/node_modules/@types/node/base.d.ts +0 -19
- package/lib/handlers/node_modules/@types/node/diagnostic_channel.d.ts +0 -34
- package/lib/handlers/node_modules/@types/node/ts3.6/assert.d.ts +0 -98
- package/lib/handlers/node_modules/@types/node/ts3.6/base.d.ts +0 -68
- package/lib/handlers/node_modules/@types/node/ts3.6/index.d.ts +0 -7
- package/lib/handlers/node_modules/@types/node/util/types.d.ts +0 -53
|
@@ -1,36 +1,542 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* HTTPS is the HTTP protocol over TLS/SSL. In Node.js this is implemented as a
|
|
3
|
+
* separate module.
|
|
4
|
+
* @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/https.js)
|
|
5
|
+
*/
|
|
1
6
|
declare module 'https' {
|
|
2
|
-
import
|
|
3
|
-
import * as
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
type ServerOptions
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
7
|
+
import { Duplex } from 'node:stream';
|
|
8
|
+
import * as tls from 'node:tls';
|
|
9
|
+
import * as http from 'node:http';
|
|
10
|
+
import { URL } from 'node:url';
|
|
11
|
+
type ServerOptions<
|
|
12
|
+
Request extends typeof http.IncomingMessage = typeof http.IncomingMessage,
|
|
13
|
+
Response extends typeof http.ServerResponse = typeof http.ServerResponse,
|
|
14
|
+
> = tls.SecureContextOptions & tls.TlsOptions & http.ServerOptions<Request, Response>;
|
|
15
|
+
type RequestOptions = http.RequestOptions &
|
|
16
|
+
tls.SecureContextOptions & {
|
|
17
|
+
checkServerIdentity?: typeof tls.checkServerIdentity | undefined;
|
|
18
|
+
rejectUnauthorized?: boolean | undefined; // Defaults to true
|
|
19
|
+
servername?: string | undefined; // SNI TLS Extension
|
|
20
|
+
};
|
|
13
21
|
interface AgentOptions extends http.AgentOptions, tls.ConnectionOptions {
|
|
14
|
-
rejectUnauthorized?: boolean;
|
|
15
|
-
maxCachedSessions?: number;
|
|
22
|
+
rejectUnauthorized?: boolean | undefined;
|
|
23
|
+
maxCachedSessions?: number | undefined;
|
|
16
24
|
}
|
|
17
|
-
|
|
25
|
+
/**
|
|
26
|
+
* An `Agent` object for HTTPS similar to `http.Agent`. See {@link request} for more information.
|
|
27
|
+
* @since v0.4.5
|
|
28
|
+
*/
|
|
18
29
|
class Agent extends http.Agent {
|
|
19
30
|
constructor(options?: AgentOptions);
|
|
20
31
|
options: AgentOptions;
|
|
21
32
|
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
33
|
+
interface Server<
|
|
34
|
+
Request extends typeof http.IncomingMessage = typeof http.IncomingMessage,
|
|
35
|
+
Response extends typeof http.ServerResponse = typeof http.ServerResponse,
|
|
36
|
+
> extends http.Server<Request, Response> {}
|
|
37
|
+
/**
|
|
38
|
+
* See `http.Server` for more information.
|
|
39
|
+
* @since v0.3.4
|
|
40
|
+
*/
|
|
41
|
+
class Server<
|
|
42
|
+
Request extends typeof http.IncomingMessage = typeof http.IncomingMessage,
|
|
43
|
+
Response extends typeof http.ServerResponse = typeof http.ServerResponse,
|
|
44
|
+
> extends tls.Server {
|
|
45
|
+
constructor(requestListener?: http.RequestListener<Request, Response>);
|
|
46
|
+
constructor(
|
|
47
|
+
options: ServerOptions<Request, Response>,
|
|
48
|
+
requestListener?: http.RequestListener<Request, Response>,
|
|
49
|
+
);
|
|
50
|
+
/**
|
|
51
|
+
* Closes all connections connected to this server.
|
|
52
|
+
* @since v18.2.0
|
|
53
|
+
*/
|
|
54
|
+
closeAllConnections(): void;
|
|
55
|
+
/**
|
|
56
|
+
* Closes all connections connected to this server which are not sending a request or waiting for a response.
|
|
57
|
+
* @since v18.2.0
|
|
58
|
+
*/
|
|
59
|
+
closeIdleConnections(): void;
|
|
60
|
+
addListener(event: string, listener: (...args: any[]) => void): this;
|
|
61
|
+
addListener(event: 'keylog', listener: (line: Buffer, tlsSocket: tls.TLSSocket) => void): this;
|
|
62
|
+
addListener(
|
|
63
|
+
event: 'newSession',
|
|
64
|
+
listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void,
|
|
65
|
+
): this;
|
|
66
|
+
addListener(
|
|
67
|
+
event: 'OCSPRequest',
|
|
68
|
+
listener: (
|
|
69
|
+
certificate: Buffer,
|
|
70
|
+
issuer: Buffer,
|
|
71
|
+
callback: (err: Error | null, resp: Buffer) => void,
|
|
72
|
+
) => void,
|
|
73
|
+
): this;
|
|
74
|
+
addListener(
|
|
75
|
+
event: 'resumeSession',
|
|
76
|
+
listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void,
|
|
77
|
+
): this;
|
|
78
|
+
addListener(event: 'secureConnection', listener: (tlsSocket: tls.TLSSocket) => void): this;
|
|
79
|
+
addListener(event: 'tlsClientError', listener: (err: Error, tlsSocket: tls.TLSSocket) => void): this;
|
|
80
|
+
addListener(event: 'close', listener: () => void): this;
|
|
81
|
+
addListener(event: 'connection', listener: (socket: Duplex) => void): this;
|
|
82
|
+
addListener(event: 'error', listener: (err: Error) => void): this;
|
|
83
|
+
addListener(event: 'listening', listener: () => void): this;
|
|
84
|
+
addListener(event: 'checkContinue', listener: http.RequestListener<Request, Response>): this;
|
|
85
|
+
addListener(event: 'checkExpectation', listener: http.RequestListener<Request, Response>): this;
|
|
86
|
+
addListener(event: 'clientError', listener: (err: Error, socket: Duplex) => void): this;
|
|
87
|
+
addListener(
|
|
88
|
+
event: 'connect',
|
|
89
|
+
listener: (req: InstanceType<Request>, socket: Duplex, head: Buffer) => void,
|
|
90
|
+
): this;
|
|
91
|
+
addListener(event: 'request', listener: http.RequestListener<Request, Response>): this;
|
|
92
|
+
addListener(
|
|
93
|
+
event: 'upgrade',
|
|
94
|
+
listener: (req: InstanceType<Request>, socket: Duplex, head: Buffer) => void,
|
|
95
|
+
): this;
|
|
96
|
+
emit(event: string, ...args: any[]): boolean;
|
|
97
|
+
emit(event: 'keylog', line: Buffer, tlsSocket: tls.TLSSocket): boolean;
|
|
98
|
+
emit(
|
|
99
|
+
event: 'newSession',
|
|
100
|
+
sessionId: Buffer,
|
|
101
|
+
sessionData: Buffer,
|
|
102
|
+
callback: (err: Error, resp: Buffer) => void,
|
|
103
|
+
): boolean;
|
|
104
|
+
emit(
|
|
105
|
+
event: 'OCSPRequest',
|
|
106
|
+
certificate: Buffer,
|
|
107
|
+
issuer: Buffer,
|
|
108
|
+
callback: (err: Error | null, resp: Buffer) => void,
|
|
109
|
+
): boolean;
|
|
110
|
+
emit(event: 'resumeSession', sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void): boolean;
|
|
111
|
+
emit(event: 'secureConnection', tlsSocket: tls.TLSSocket): boolean;
|
|
112
|
+
emit(event: 'tlsClientError', err: Error, tlsSocket: tls.TLSSocket): boolean;
|
|
113
|
+
emit(event: 'close'): boolean;
|
|
114
|
+
emit(event: 'connection', socket: Duplex): boolean;
|
|
115
|
+
emit(event: 'error', err: Error): boolean;
|
|
116
|
+
emit(event: 'listening'): boolean;
|
|
117
|
+
emit(
|
|
118
|
+
event: 'checkContinue',
|
|
119
|
+
req: InstanceType<Request>,
|
|
120
|
+
res: InstanceType<Response> & { req: InstanceType<Request> },
|
|
121
|
+
): boolean;
|
|
122
|
+
emit(
|
|
123
|
+
event: 'checkExpectation',
|
|
124
|
+
req: InstanceType<Request>,
|
|
125
|
+
res: InstanceType<Response> & { req: InstanceType<Request> },
|
|
126
|
+
): boolean;
|
|
127
|
+
emit(event: 'clientError', err: Error, socket: Duplex): boolean;
|
|
128
|
+
emit(event: 'connect', req: InstanceType<Request>, socket: Duplex, head: Buffer): boolean;
|
|
129
|
+
emit(
|
|
130
|
+
event: 'request',
|
|
131
|
+
req: InstanceType<Request>,
|
|
132
|
+
res: InstanceType<Response> & { req: InstanceType<Request> },
|
|
133
|
+
): boolean;
|
|
134
|
+
emit(event: 'upgrade', req: InstanceType<Request>, socket: Duplex, head: Buffer): boolean;
|
|
135
|
+
on(event: string, listener: (...args: any[]) => void): this;
|
|
136
|
+
on(event: 'keylog', listener: (line: Buffer, tlsSocket: tls.TLSSocket) => void): this;
|
|
137
|
+
on(
|
|
138
|
+
event: 'newSession',
|
|
139
|
+
listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void,
|
|
140
|
+
): this;
|
|
141
|
+
on(
|
|
142
|
+
event: 'OCSPRequest',
|
|
143
|
+
listener: (
|
|
144
|
+
certificate: Buffer,
|
|
145
|
+
issuer: Buffer,
|
|
146
|
+
callback: (err: Error | null, resp: Buffer) => void,
|
|
147
|
+
) => void,
|
|
148
|
+
): this;
|
|
149
|
+
on(
|
|
150
|
+
event: 'resumeSession',
|
|
151
|
+
listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void,
|
|
152
|
+
): this;
|
|
153
|
+
on(event: 'secureConnection', listener: (tlsSocket: tls.TLSSocket) => void): this;
|
|
154
|
+
on(event: 'tlsClientError', listener: (err: Error, tlsSocket: tls.TLSSocket) => void): this;
|
|
155
|
+
on(event: 'close', listener: () => void): this;
|
|
156
|
+
on(event: 'connection', listener: (socket: Duplex) => void): this;
|
|
157
|
+
on(event: 'error', listener: (err: Error) => void): this;
|
|
158
|
+
on(event: 'listening', listener: () => void): this;
|
|
159
|
+
on(event: 'checkContinue', listener: http.RequestListener<Request, Response>): this;
|
|
160
|
+
on(event: 'checkExpectation', listener: http.RequestListener<Request, Response>): this;
|
|
161
|
+
on(event: 'clientError', listener: (err: Error, socket: Duplex) => void): this;
|
|
162
|
+
on(event: 'connect', listener: (req: InstanceType<Request>, socket: Duplex, head: Buffer) => void): this;
|
|
163
|
+
on(event: 'request', listener: http.RequestListener<Request, Response>): this;
|
|
164
|
+
on(event: 'upgrade', listener: (req: InstanceType<Request>, socket: Duplex, head: Buffer) => void): this;
|
|
165
|
+
once(event: string, listener: (...args: any[]) => void): this;
|
|
166
|
+
once(event: 'keylog', listener: (line: Buffer, tlsSocket: tls.TLSSocket) => void): this;
|
|
167
|
+
once(
|
|
168
|
+
event: 'newSession',
|
|
169
|
+
listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void,
|
|
170
|
+
): this;
|
|
171
|
+
once(
|
|
172
|
+
event: 'OCSPRequest',
|
|
173
|
+
listener: (
|
|
174
|
+
certificate: Buffer,
|
|
175
|
+
issuer: Buffer,
|
|
176
|
+
callback: (err: Error | null, resp: Buffer) => void,
|
|
177
|
+
) => void,
|
|
178
|
+
): this;
|
|
179
|
+
once(
|
|
180
|
+
event: 'resumeSession',
|
|
181
|
+
listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void,
|
|
182
|
+
): this;
|
|
183
|
+
once(event: 'secureConnection', listener: (tlsSocket: tls.TLSSocket) => void): this;
|
|
184
|
+
once(event: 'tlsClientError', listener: (err: Error, tlsSocket: tls.TLSSocket) => void): this;
|
|
185
|
+
once(event: 'close', listener: () => void): this;
|
|
186
|
+
once(event: 'connection', listener: (socket: Duplex) => void): this;
|
|
187
|
+
once(event: 'error', listener: (err: Error) => void): this;
|
|
188
|
+
once(event: 'listening', listener: () => void): this;
|
|
189
|
+
once(event: 'checkContinue', listener: http.RequestListener<Request, Response>): this;
|
|
190
|
+
once(event: 'checkExpectation', listener: http.RequestListener<Request, Response>): this;
|
|
191
|
+
once(event: 'clientError', listener: (err: Error, socket: Duplex) => void): this;
|
|
192
|
+
once(event: 'connect', listener: (req: InstanceType<Request>, socket: Duplex, head: Buffer) => void): this;
|
|
193
|
+
once(event: 'request', listener: http.RequestListener<Request, Response>): this;
|
|
194
|
+
once(event: 'upgrade', listener: (req: InstanceType<Request>, socket: Duplex, head: Buffer) => void): this;
|
|
195
|
+
prependListener(event: string, listener: (...args: any[]) => void): this;
|
|
196
|
+
prependListener(event: 'keylog', listener: (line: Buffer, tlsSocket: tls.TLSSocket) => void): this;
|
|
197
|
+
prependListener(
|
|
198
|
+
event: 'newSession',
|
|
199
|
+
listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void,
|
|
200
|
+
): this;
|
|
201
|
+
prependListener(
|
|
202
|
+
event: 'OCSPRequest',
|
|
203
|
+
listener: (
|
|
204
|
+
certificate: Buffer,
|
|
205
|
+
issuer: Buffer,
|
|
206
|
+
callback: (err: Error | null, resp: Buffer) => void,
|
|
207
|
+
) => void,
|
|
208
|
+
): this;
|
|
209
|
+
prependListener(
|
|
210
|
+
event: 'resumeSession',
|
|
211
|
+
listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void,
|
|
212
|
+
): this;
|
|
213
|
+
prependListener(event: 'secureConnection', listener: (tlsSocket: tls.TLSSocket) => void): this;
|
|
214
|
+
prependListener(event: 'tlsClientError', listener: (err: Error, tlsSocket: tls.TLSSocket) => void): this;
|
|
215
|
+
prependListener(event: 'close', listener: () => void): this;
|
|
216
|
+
prependListener(event: 'connection', listener: (socket: Duplex) => void): this;
|
|
217
|
+
prependListener(event: 'error', listener: (err: Error) => void): this;
|
|
218
|
+
prependListener(event: 'listening', listener: () => void): this;
|
|
219
|
+
prependListener(event: 'checkContinue', listener: http.RequestListener<Request, Response>): this;
|
|
220
|
+
prependListener(event: 'checkExpectation', listener: http.RequestListener<Request, Response>): this;
|
|
221
|
+
prependListener(event: 'clientError', listener: (err: Error, socket: Duplex) => void): this;
|
|
222
|
+
prependListener(
|
|
223
|
+
event: 'connect',
|
|
224
|
+
listener: (req: InstanceType<Request>, socket: Duplex, head: Buffer) => void,
|
|
225
|
+
): this;
|
|
226
|
+
prependListener(event: 'request', listener: http.RequestListener<Request, Response>): this;
|
|
227
|
+
prependListener(
|
|
228
|
+
event: 'upgrade',
|
|
229
|
+
listener: (req: InstanceType<Request>, socket: Duplex, head: Buffer) => void,
|
|
230
|
+
): this;
|
|
231
|
+
prependOnceListener(event: string, listener: (...args: any[]) => void): this;
|
|
232
|
+
prependOnceListener(event: 'keylog', listener: (line: Buffer, tlsSocket: tls.TLSSocket) => void): this;
|
|
233
|
+
prependOnceListener(
|
|
234
|
+
event: 'newSession',
|
|
235
|
+
listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void,
|
|
236
|
+
): this;
|
|
237
|
+
prependOnceListener(
|
|
238
|
+
event: 'OCSPRequest',
|
|
239
|
+
listener: (
|
|
240
|
+
certificate: Buffer,
|
|
241
|
+
issuer: Buffer,
|
|
242
|
+
callback: (err: Error | null, resp: Buffer) => void,
|
|
243
|
+
) => void,
|
|
244
|
+
): this;
|
|
245
|
+
prependOnceListener(
|
|
246
|
+
event: 'resumeSession',
|
|
247
|
+
listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void,
|
|
248
|
+
): this;
|
|
249
|
+
prependOnceListener(event: 'secureConnection', listener: (tlsSocket: tls.TLSSocket) => void): this;
|
|
250
|
+
prependOnceListener(event: 'tlsClientError', listener: (err: Error, tlsSocket: tls.TLSSocket) => void): this;
|
|
251
|
+
prependOnceListener(event: 'close', listener: () => void): this;
|
|
252
|
+
prependOnceListener(event: 'connection', listener: (socket: Duplex) => void): this;
|
|
253
|
+
prependOnceListener(event: 'error', listener: (err: Error) => void): this;
|
|
254
|
+
prependOnceListener(event: 'listening', listener: () => void): this;
|
|
255
|
+
prependOnceListener(event: 'checkContinue', listener: http.RequestListener<Request, Response>): this;
|
|
256
|
+
prependOnceListener(event: 'checkExpectation', listener: http.RequestListener<Request, Response>): this;
|
|
257
|
+
prependOnceListener(event: 'clientError', listener: (err: Error, socket: Duplex) => void): this;
|
|
258
|
+
prependOnceListener(
|
|
259
|
+
event: 'connect',
|
|
260
|
+
listener: (req: InstanceType<Request>, socket: Duplex, head: Buffer) => void,
|
|
261
|
+
): this;
|
|
262
|
+
prependOnceListener(event: 'request', listener: http.RequestListener<Request, Response>): this;
|
|
263
|
+
prependOnceListener(
|
|
264
|
+
event: 'upgrade',
|
|
265
|
+
listener: (req: InstanceType<Request>, socket: Duplex, head: Buffer) => void,
|
|
266
|
+
): this;
|
|
27
267
|
}
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
268
|
+
/**
|
|
269
|
+
* ```js
|
|
270
|
+
* // curl -k https://localhost:8000/
|
|
271
|
+
* const https = require('https');
|
|
272
|
+
* const fs = require('fs');
|
|
273
|
+
*
|
|
274
|
+
* const options = {
|
|
275
|
+
* key: fs.readFileSync('test/fixtures/keys/agent2-key.pem'),
|
|
276
|
+
* cert: fs.readFileSync('test/fixtures/keys/agent2-cert.pem')
|
|
277
|
+
* };
|
|
278
|
+
*
|
|
279
|
+
* https.createServer(options, (req, res) => {
|
|
280
|
+
* res.writeHead(200);
|
|
281
|
+
* res.end('hello world\n');
|
|
282
|
+
* }).listen(8000);
|
|
283
|
+
* ```
|
|
284
|
+
*
|
|
285
|
+
* Or
|
|
286
|
+
*
|
|
287
|
+
* ```js
|
|
288
|
+
* const https = require('https');
|
|
289
|
+
* const fs = require('fs');
|
|
290
|
+
*
|
|
291
|
+
* const options = {
|
|
292
|
+
* pfx: fs.readFileSync('test/fixtures/test_cert.pfx'),
|
|
293
|
+
* passphrase: 'sample'
|
|
294
|
+
* };
|
|
295
|
+
*
|
|
296
|
+
* https.createServer(options, (req, res) => {
|
|
297
|
+
* res.writeHead(200);
|
|
298
|
+
* res.end('hello world\n');
|
|
299
|
+
* }).listen(8000);
|
|
300
|
+
* ```
|
|
301
|
+
* @since v0.3.4
|
|
302
|
+
* @param options Accepts `options` from `createServer`, `createSecureContext` and `createServer`.
|
|
303
|
+
* @param requestListener A listener to be added to the `'request'` event.
|
|
304
|
+
*/
|
|
305
|
+
function createServer<
|
|
306
|
+
Request extends typeof http.IncomingMessage = typeof http.IncomingMessage,
|
|
307
|
+
Response extends typeof http.ServerResponse = typeof http.ServerResponse,
|
|
308
|
+
>(requestListener?: http.RequestListener<Request, Response>): Server<Request, Response>;
|
|
309
|
+
function createServer<
|
|
310
|
+
Request extends typeof http.IncomingMessage = typeof http.IncomingMessage,
|
|
311
|
+
Response extends typeof http.ServerResponse = typeof http.ServerResponse,
|
|
312
|
+
>(
|
|
313
|
+
options: ServerOptions<Request, Response>,
|
|
314
|
+
requestListener?: http.RequestListener<Request, Response>,
|
|
315
|
+
): Server<Request, Response>;
|
|
316
|
+
/**
|
|
317
|
+
* Makes a request to a secure web server.
|
|
318
|
+
*
|
|
319
|
+
* The following additional `options` from `tls.connect()` are also accepted:`ca`, `cert`, `ciphers`, `clientCertEngine`, `crl`, `dhparam`, `ecdhCurve`,`honorCipherOrder`, `key`, `passphrase`,
|
|
320
|
+
* `pfx`, `rejectUnauthorized`,`secureOptions`, `secureProtocol`, `servername`, `sessionIdContext`,`highWaterMark`.
|
|
321
|
+
*
|
|
322
|
+
* `options` can be an object, a string, or a `URL` object. If `options` is a
|
|
323
|
+
* string, it is automatically parsed with `new URL()`. If it is a `URL` object, it will be automatically converted to an ordinary `options` object.
|
|
324
|
+
*
|
|
325
|
+
* `https.request()` returns an instance of the `http.ClientRequest` class. The `ClientRequest` instance is a writable stream. If one needs to
|
|
326
|
+
* upload a file with a POST request, then write to the `ClientRequest` object.
|
|
327
|
+
*
|
|
328
|
+
* ```js
|
|
329
|
+
* const https = require('https');
|
|
330
|
+
*
|
|
331
|
+
* const options = {
|
|
332
|
+
* hostname: 'encrypted.google.com',
|
|
333
|
+
* port: 443,
|
|
334
|
+
* path: '/',
|
|
335
|
+
* method: 'GET'
|
|
336
|
+
* };
|
|
337
|
+
*
|
|
338
|
+
* const req = https.request(options, (res) => {
|
|
339
|
+
* console.log('statusCode:', res.statusCode);
|
|
340
|
+
* console.log('headers:', res.headers);
|
|
341
|
+
*
|
|
342
|
+
* res.on('data', (d) => {
|
|
343
|
+
* process.stdout.write(d);
|
|
344
|
+
* });
|
|
345
|
+
* });
|
|
346
|
+
*
|
|
347
|
+
* req.on('error', (e) => {
|
|
348
|
+
* console.error(e);
|
|
349
|
+
* });
|
|
350
|
+
* req.end();
|
|
351
|
+
* ```
|
|
352
|
+
*
|
|
353
|
+
* Example using options from `tls.connect()`:
|
|
354
|
+
*
|
|
355
|
+
* ```js
|
|
356
|
+
* const options = {
|
|
357
|
+
* hostname: 'encrypted.google.com',
|
|
358
|
+
* port: 443,
|
|
359
|
+
* path: '/',
|
|
360
|
+
* method: 'GET',
|
|
361
|
+
* key: fs.readFileSync('test/fixtures/keys/agent2-key.pem'),
|
|
362
|
+
* cert: fs.readFileSync('test/fixtures/keys/agent2-cert.pem')
|
|
363
|
+
* };
|
|
364
|
+
* options.agent = new https.Agent(options);
|
|
365
|
+
*
|
|
366
|
+
* const req = https.request(options, (res) => {
|
|
367
|
+
* // ...
|
|
368
|
+
* });
|
|
369
|
+
* ```
|
|
370
|
+
*
|
|
371
|
+
* Alternatively, opt out of connection pooling by not using an `Agent`.
|
|
372
|
+
*
|
|
373
|
+
* ```js
|
|
374
|
+
* const options = {
|
|
375
|
+
* hostname: 'encrypted.google.com',
|
|
376
|
+
* port: 443,
|
|
377
|
+
* path: '/',
|
|
378
|
+
* method: 'GET',
|
|
379
|
+
* key: fs.readFileSync('test/fixtures/keys/agent2-key.pem'),
|
|
380
|
+
* cert: fs.readFileSync('test/fixtures/keys/agent2-cert.pem'),
|
|
381
|
+
* agent: false
|
|
382
|
+
* };
|
|
383
|
+
*
|
|
384
|
+
* const req = https.request(options, (res) => {
|
|
385
|
+
* // ...
|
|
386
|
+
* });
|
|
387
|
+
* ```
|
|
388
|
+
*
|
|
389
|
+
* Example using a `URL` as `options`:
|
|
390
|
+
*
|
|
391
|
+
* ```js
|
|
392
|
+
* const options = new URL('https://abc:xyz@example.com');
|
|
393
|
+
*
|
|
394
|
+
* const req = https.request(options, (res) => {
|
|
395
|
+
* // ...
|
|
396
|
+
* });
|
|
397
|
+
* ```
|
|
398
|
+
*
|
|
399
|
+
* Example pinning on certificate fingerprint, or the public key (similar to`pin-sha256`):
|
|
400
|
+
*
|
|
401
|
+
* ```js
|
|
402
|
+
* const tls = require('tls');
|
|
403
|
+
* const https = require('https');
|
|
404
|
+
* const crypto = require('crypto');
|
|
405
|
+
*
|
|
406
|
+
* function sha256(s) {
|
|
407
|
+
* return crypto.createHash('sha256').update(s).digest('base64');
|
|
408
|
+
* }
|
|
409
|
+
* const options = {
|
|
410
|
+
* hostname: 'github.com',
|
|
411
|
+
* port: 443,
|
|
412
|
+
* path: '/',
|
|
413
|
+
* method: 'GET',
|
|
414
|
+
* checkServerIdentity: function(host, cert) {
|
|
415
|
+
* // Make sure the certificate is issued to the host we are connected to
|
|
416
|
+
* const err = tls.checkServerIdentity(host, cert);
|
|
417
|
+
* if (err) {
|
|
418
|
+
* return err;
|
|
419
|
+
* }
|
|
420
|
+
*
|
|
421
|
+
* // Pin the public key, similar to HPKP pin-sha25 pinning
|
|
422
|
+
* const pubkey256 = 'pL1+qb9HTMRZJmuC/bB/ZI9d302BYrrqiVuRyW+DGrU=';
|
|
423
|
+
* if (sha256(cert.pubkey) !== pubkey256) {
|
|
424
|
+
* const msg = 'Certificate verification error: ' +
|
|
425
|
+
* `The public key of '${cert.subject.CN}' ` +
|
|
426
|
+
* 'does not match our pinned fingerprint';
|
|
427
|
+
* return new Error(msg);
|
|
428
|
+
* }
|
|
429
|
+
*
|
|
430
|
+
* // Pin the exact certificate, rather than the pub key
|
|
431
|
+
* const cert256 = '25:FE:39:32:D9:63:8C:8A:FC:A1:9A:29:87:' +
|
|
432
|
+
* 'D8:3E:4C:1D:98:DB:71:E4:1A:48:03:98:EA:22:6A:BD:8B:93:16';
|
|
433
|
+
* if (cert.fingerprint256 !== cert256) {
|
|
434
|
+
* const msg = 'Certificate verification error: ' +
|
|
435
|
+
* `The certificate of '${cert.subject.CN}' ` +
|
|
436
|
+
* 'does not match our pinned fingerprint';
|
|
437
|
+
* return new Error(msg);
|
|
438
|
+
* }
|
|
439
|
+
*
|
|
440
|
+
* // This loop is informational only.
|
|
441
|
+
* // Print the certificate and public key fingerprints of all certs in the
|
|
442
|
+
* // chain. Its common to pin the public key of the issuer on the public
|
|
443
|
+
* // internet, while pinning the public key of the service in sensitive
|
|
444
|
+
* // environments.
|
|
445
|
+
* do {
|
|
446
|
+
* console.log('Subject Common Name:', cert.subject.CN);
|
|
447
|
+
* console.log(' Certificate SHA256 fingerprint:', cert.fingerprint256);
|
|
448
|
+
*
|
|
449
|
+
* hash = crypto.createHash('sha256');
|
|
450
|
+
* console.log(' Public key ping-sha256:', sha256(cert.pubkey));
|
|
451
|
+
*
|
|
452
|
+
* lastprint256 = cert.fingerprint256;
|
|
453
|
+
* cert = cert.issuerCertificate;
|
|
454
|
+
* } while (cert.fingerprint256 !== lastprint256);
|
|
455
|
+
*
|
|
456
|
+
* },
|
|
457
|
+
* };
|
|
458
|
+
*
|
|
459
|
+
* options.agent = new https.Agent(options);
|
|
460
|
+
* const req = https.request(options, (res) => {
|
|
461
|
+
* console.log('All OK. Server matched our pinned cert or public key');
|
|
462
|
+
* console.log('statusCode:', res.statusCode);
|
|
463
|
+
* // Print the HPKP values
|
|
464
|
+
* console.log('headers:', res.headers['public-key-pins']);
|
|
465
|
+
*
|
|
466
|
+
* res.on('data', (d) => {});
|
|
467
|
+
* });
|
|
468
|
+
*
|
|
469
|
+
* req.on('error', (e) => {
|
|
470
|
+
* console.error(e.message);
|
|
471
|
+
* });
|
|
472
|
+
* req.end();
|
|
473
|
+
* ```
|
|
474
|
+
*
|
|
475
|
+
* Outputs for example:
|
|
476
|
+
*
|
|
477
|
+
* ```text
|
|
478
|
+
* Subject Common Name: github.com
|
|
479
|
+
* Certificate SHA256 fingerprint: 25:FE:39:32:D9:63:8C:8A:FC:A1:9A:29:87:D8:3E:4C:1D:98:DB:71:E4:1A:48:03:98:EA:22:6A:BD:8B:93:16
|
|
480
|
+
* Public key ping-sha256: pL1+qb9HTMRZJmuC/bB/ZI9d302BYrrqiVuRyW+DGrU=
|
|
481
|
+
* Subject Common Name: DigiCert SHA2 Extended Validation Server CA
|
|
482
|
+
* Certificate SHA256 fingerprint: 40:3E:06:2A:26:53:05:91:13:28:5B:AF:80:A0:D4:AE:42:2C:84:8C:9F:78:FA:D0:1F:C9:4B:C5:B8:7F:EF:1A
|
|
483
|
+
* Public key ping-sha256: RRM1dGqnDFsCJXBTHky16vi1obOlCgFFn/yOhI/y+ho=
|
|
484
|
+
* Subject Common Name: DigiCert High Assurance EV Root CA
|
|
485
|
+
* Certificate SHA256 fingerprint: 74:31:E5:F4:C3:C1:CE:46:90:77:4F:0B:61:E0:54:40:88:3B:A9:A0:1E:D0:0B:A6:AB:D7:80:6E:D3:B1:18:CF
|
|
486
|
+
* Public key ping-sha256: WoiWRyIOVNa9ihaBciRSC7XHjliYS9VwUGOIud4PB18=
|
|
487
|
+
* All OK. Server matched our pinned cert or public key
|
|
488
|
+
* statusCode: 200
|
|
489
|
+
* headers: max-age=0; pin-sha256="WoiWRyIOVNa9ihaBciRSC7XHjliYS9VwUGOIud4PB18="; pin-sha256="RRM1dGqnDFsCJXBTHky16vi1obOlCgFFn/yOhI/y+ho=";
|
|
490
|
+
* pin-sha256="k2v657xBsOVe1PQRwOsHsw3bsGT2VzIqz5K+59sNQws="; pin-sha256="K87oWBWM9UZfyddvDfoxL+8lpNyoUB2ptGtn0fv6G2Q="; pin-sha256="IQBnNBEiFuhj+8x6X8XLgh01V9Ic5/V3IRQLNFFc7v4=";
|
|
491
|
+
* pin-sha256="iie1VXtL7HzAMF+/PVPR9xzT80kQxdZeJ+zduCB3uj0="; pin-sha256="LvRiGEjRqfzurezaWuj8Wie2gyHMrW5Q06LspMnox7A="; includeSubDomains
|
|
492
|
+
* ```
|
|
493
|
+
* @since v0.3.6
|
|
494
|
+
* @param options Accepts all `options` from `request`, with some differences in default values:
|
|
495
|
+
*/
|
|
496
|
+
function request(
|
|
497
|
+
options: RequestOptions | string | URL,
|
|
498
|
+
callback?: (res: http.IncomingMessage) => void,
|
|
499
|
+
): http.ClientRequest;
|
|
500
|
+
function request(
|
|
501
|
+
url: string | URL,
|
|
502
|
+
options: RequestOptions,
|
|
503
|
+
callback?: (res: http.IncomingMessage) => void,
|
|
504
|
+
): http.ClientRequest;
|
|
505
|
+
/**
|
|
506
|
+
* Like `http.get()` but for HTTPS.
|
|
507
|
+
*
|
|
508
|
+
* `options` can be an object, a string, or a `URL` object. If `options` is a
|
|
509
|
+
* string, it is automatically parsed with `new URL()`. If it is a `URL` object, it will be automatically converted to an ordinary `options` object.
|
|
510
|
+
*
|
|
511
|
+
* ```js
|
|
512
|
+
* const https = require('https');
|
|
513
|
+
*
|
|
514
|
+
* https.get('https://encrypted.google.com/', (res) => {
|
|
515
|
+
* console.log('statusCode:', res.statusCode);
|
|
516
|
+
* console.log('headers:', res.headers);
|
|
517
|
+
*
|
|
518
|
+
* res.on('data', (d) => {
|
|
519
|
+
* process.stdout.write(d);
|
|
520
|
+
* });
|
|
521
|
+
*
|
|
522
|
+
* }).on('error', (e) => {
|
|
523
|
+
* console.error(e);
|
|
524
|
+
* });
|
|
525
|
+
* ```
|
|
526
|
+
* @since v0.3.6
|
|
527
|
+
* @param options Accepts the same `options` as {@link request}, with the `method` always set to `GET`.
|
|
528
|
+
*/
|
|
529
|
+
function get(
|
|
530
|
+
options: RequestOptions | string | URL,
|
|
531
|
+
callback?: (res: http.IncomingMessage) => void,
|
|
532
|
+
): http.ClientRequest;
|
|
533
|
+
function get(
|
|
534
|
+
url: string | URL,
|
|
535
|
+
options: RequestOptions,
|
|
536
|
+
callback?: (res: http.IncomingMessage) => void,
|
|
537
|
+
): http.ClientRequest;
|
|
35
538
|
let globalAgent: Agent;
|
|
36
539
|
}
|
|
540
|
+
declare module 'node:https' {
|
|
541
|
+
export * from 'https';
|
|
542
|
+
}
|