Skip to content

Instantly share code, notes, and snippets.

@fengmk2
Created March 14, 2014 01:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fengmk2/9540552 to your computer and use it in GitHub Desktop.
Save fengmk2/9540552 to your computer and use it in GitHub Desktop.
deprecate an old api
exports.Client = util.deprecate(Client,
'http.Client will be removed soon. Do not use it.');
exports.createClient = util.deprecate(function(port, host) {
return new Client(port, host);
}, 'http.createClient is deprecated. Use `http.request` instead.');
// from https://github.com/joyent/node/blob/v0.11.12/lib/http.js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment