mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-24 05:06:02 +08:00
http.RequestOptions.agent can also be a boolean
https://nodejs.org/api/http.html#http_http_request_options_callback
This commit is contained in:
@@ -226,6 +226,16 @@ module http_tests {
|
||||
});
|
||||
|
||||
var agent: http.Agent = http.globalAgent;
|
||||
|
||||
http.request({
|
||||
agent: false
|
||||
});
|
||||
http.request({
|
||||
agent: agent
|
||||
});
|
||||
http.request({
|
||||
agent: undefined
|
||||
});
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////
|
||||
|
||||
2
node/node.d.ts
vendored
2
node/node.d.ts
vendored
@@ -453,7 +453,7 @@ declare module "http" {
|
||||
path?: string;
|
||||
headers?: { [key: string]: any };
|
||||
auth?: string;
|
||||
agent?: Agent;
|
||||
agent?: Agent|boolean;
|
||||
}
|
||||
|
||||
export interface Server extends events.EventEmitter {
|
||||
|
||||
Reference in New Issue
Block a user