From 60131fc88c165b3b556a16bc25f244c6d63a0482 Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Wed, 4 Nov 2009 12:37:52 +0100 Subject: [PATCH] Expose http.ClientRequest and http.ServerResponse --- lib/http.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/http.js b/lib/http.js index c94ccfa767..f31d437364 100644 --- a/lib/http.js +++ b/lib/http.js @@ -314,6 +314,7 @@ function ServerResponse () { this.use_chunked_encoding_by_default = true; } process.inherits(ServerResponse, OutgoingMessage); +exports.ServerResponse = ServerResponse; ServerResponse.prototype.sendHeader = function (statusCode, headers) { var reason = STATUS_CODES[statusCode] || "unknown"; @@ -336,6 +337,7 @@ function ClientRequest (method, uri, headers) { this.sendHeaderLines(method + " " + uri + " HTTP/1.0\r\n", headers); } process.inherits(ClientRequest, OutgoingMessage); +exports.ClientRequest = ClientRequest; ClientRequest.prototype.finish = function (responseListener) { this.addListener("response", responseListener);