Instructions for the http.createClient method in node.js
- 2020-05-05 10:51:43
- OfStack
method description:
This feature is outdated, and the new version USES [http.request ()][] instead.
A new HTTP client was built.
syntax:
http.createClient([port], [host])
Since this method belongs to the http module, the http module (var http= require(" http "))
needs to be introduced before usereceive parameters:
post port
host host
source:
exports.createClient = util.deprecate(function(port, host) {
return new Client(port, host);
}, 'http.createClient is deprecated. Use `http.request` instead.');