Skip to content

Commit

Permalink
Expose ClientRequest and IncomingMessage constructors
Browse files Browse the repository at this point in the history
For compatibility with node. Fixes #76 and #81.
  • Loading branch information
jhiesey committed Jan 15, 2018
1 parent 80f74c2 commit bf580d3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions index.js
@@ -1,4 +1,5 @@
var ClientRequest = require('./lib/request')
var IncomingMessage = require('./lib/response')
var extend = require('xtend')
var statusCodes = require('builtin-status-codes')
var url = require('url')
Expand Down Expand Up @@ -44,6 +45,9 @@ http.get = function get (opts, cb) {
return req
}

http.ClientRequest = ClientRequest
http.IncomingMessage = IncomingMessage

http.Agent = function () {}
http.Agent.defaultMaxSockets = 4

Expand Down

0 comments on commit bf580d3

Please sign in to comment.