http: Add agent.get/request methods

This commit is contained in:
isaacs
2013-05-21 14:02:18 -07:00
parent 9fc9b87472
commit 40e92650bb
5 changed files with 136 additions and 29 deletions

View File

@@ -83,10 +83,11 @@ function createConnection(port, host, options) {
function Agent(options) {
http.Agent.call(this, options);
this.createConnection = createConnection;
}
inherits(Agent, http.Agent);
Agent.prototype.defaultPort = 443;
Agent.prototype.protocol = 'https:';
Agent.prototype.createConnection = createConnection;
var globalAgent = new Agent();