node.js中的http.createClient方法使用说明

2026-01-16 18:52:05 作者:用户投稿

方法说明:

此功能已过时,新版本使用 [http.request()][] 来代替它。

构建了一种新的HTTP客户端。

语法:

复制代码 代码如下:
http.createClient([port], [host])

由于该方法属于http模块,使用前需要引入http模块(var http= require(“http”) )

接收参数:

post     端口

host     主机

源码:

复制代码 代码如下:
exports.createClient = util.deprecate(function(port, host) {
  return new Client(port, host);
}, 'http.createClient is deprecated. Use `http.request` instead.');

猜你喜欢

联络方式:

400 9058 355

邮箱:8955556@qq.com

Q Q:8955556

微信二维码
在线咨询 拨打电话

电话

400 9058 355

微信二维码

微信二维码