mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-24 05:06:02 +08:00
Fixed the incorrect parameter type in the constructor of https.Agent (#9232)
This commit is contained in:
@@ -8,6 +8,7 @@ import * as util from "util";
|
||||
import * as crypto from "crypto";
|
||||
import * as tls from "tls";
|
||||
import * as http from "http";
|
||||
import * as https from "https";
|
||||
import * as net from "net";
|
||||
import * as tty from "tty";
|
||||
import * as dgram from "dgram";
|
||||
@@ -367,6 +368,31 @@ namespace http_tests {
|
||||
});
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////
|
||||
/// Https tests : http://nodejs.org/api/https.html
|
||||
////////////////////////////////////////////////////
|
||||
namespace https_tests {
|
||||
var agent: https.Agent = new https.Agent({
|
||||
keepAlive: true,
|
||||
keepAliveMsecs: 10000,
|
||||
maxSockets: Infinity,
|
||||
maxFreeSockets: 256,
|
||||
maxCachedSessions: 100
|
||||
});
|
||||
|
||||
var agent: https.Agent = https.globalAgent;
|
||||
|
||||
https.request({
|
||||
agent: false
|
||||
});
|
||||
https.request({
|
||||
agent: agent
|
||||
});
|
||||
https.request({
|
||||
agent: undefined
|
||||
});
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////
|
||||
/// TTY tests : http://nodejs.org/api/tty.html
|
||||
////////////////////////////////////////////////////
|
||||
|
||||
Reference in New Issue
Block a user