node.js中的http.createClient方法使用说明
方法说明:
此功能已过时,新版本使用[http.request()][]来代替它。
构建了一种新的HTTP客户端。
语法:
http.createClient([port],[host])
由于该方法属于http模块,使用前需要引入http模块(varhttp=require(“http”))
接收参数:
post 端口
host 主机
源码:
exports.createClient=util.deprecate(function(port,host){ returnnewClient(port,host); },'http.createClientisdeprecated.Use`http.request`instead.');