diff --git a/lib/http.js b/lib/http.js index 463184e148..1385e4272c 100755 --- a/lib/http.js +++ b/lib/http.js @@ -210,11 +210,6 @@ function IncomingMessage (socket) { util.inherits(IncomingMessage, stream.Stream); exports.IncomingMessage = IncomingMessage; -IncomingMessage.prototype._parseQueryString = function () { - throw new Error("_parseQueryString is deprecated. Use require(\"querystring\") to parse query strings.\n"); -}; - - IncomingMessage.prototype.setEncoding = function (encoding) { var StringDecoder = require("string_decoder").StringDecoder; // lazy load this._decoder = new StringDecoder(encoding); @@ -469,12 +464,6 @@ OutgoingMessage.prototype._storeHeader = function (firstLine, headers) { } }; - -OutgoingMessage.prototype.sendBody = function () { - throw new Error("sendBody() has been renamed to write(). "); -}; - - OutgoingMessage.prototype.write = function (chunk, encoding) { if (!this._header) { throw new Error("You have to call writeHead() before write()"); @@ -680,24 +669,6 @@ function ClientRequest (socket, method, url, headers) { util.inherits(ClientRequest, OutgoingMessage); exports.ClientRequest = ClientRequest; -ClientRequest.prototype.finish = function () { - throw new Error( "finish() has been renamed to end() and no longer takes " - + "a response handler as an argument. Manually add a 'response' listener " - + "to the request object." - ); -}; - - -ClientRequest.prototype.end = function () { - if (typeof arguments[0] == "function") { - throw new Error( "ClientRequest.prototype.end does not take a callback. " - + "Add a 'response' listener manually to get the response." - ); - } - OutgoingMessage.prototype.end.apply(this, arguments); -}; - - function outgoingFlush (socket) { // This logic is probably a bit confusing. Let me explain a bit: // @@ -1059,27 +1030,6 @@ Client.prototype._reconnect = function () { } }; - -Client.prototype.get = function () { - throw new Error("client.get(...) is now client.request('GET', ...)"); -}; - -Client.prototype.head = function () { - throw new Error("client.head(...) is now client.request('HEAD', ...)"); -}; - -Client.prototype.post = function () { - throw new Error("client.post(...) is now client.request('POST', ...)"); -}; - -Client.prototype.del = function () { - throw new Error("client.del(...) is now client.request('DELETE', ...)"); -}; - -Client.prototype.put = function () { - throw new Error("client.put(...) is now client.request('PUT', ...)"); -}; - Client.prototype.request = function (method, url, headers) { if (typeof(url) != "string") { // assume method was omitted, shift arguments