Merge pull request #7239 from rogierschouten/node-http-agent

http.RequestOptions.agent can also be a boolean
This commit is contained in:
Horiuchi_H
2015-12-22 19:14:08 +09:00
2 changed files with 11 additions and 1 deletions

View File

@@ -233,6 +233,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
View File

@@ -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 {