Great gods, why do the following codes always report errors?

  node.js, question
var querystring=require('querystring');
 var https=require('https');
 //post Data to Pass
 var body =querystring.stringify({
 "device_num":"1",
 "device_list":[
 bracket
 "id":"gh_c3f41afcc90a_f17959764f51b772",
 "mac":"C89346A0EFF2",
 "connect_protocol":"3",
 "auth_key":"",
 "close_strategy":"1",
 "conn_strategy":"1",
 "crypt_method":"0",
 "auth_ver":"1",
 "manu_mac_pos":"-1",
 "ser_mac_pos":"-2",
 "ble_simple_protocol": "0"
 bracket
 ],
 "op_type":"1"
 });
 //var string = JSON.stringify(body);
 var options = {
 
 url: 'https://api.weixin.qq.com/device/authorize_device?  access_token=xIfsQltqcgSCpwqIPtB2aKZmcV2_tFeb-8Q-NkSufkj_7m3Jhk1xs9LJwIa5cbvrY49CdFpYMwy0IJXim-BX5oU3vRX5acw7leuBP2PdHXH5ahMeipZNObdeRM',
 method: 'POST',
 headers: {
 "Content-Type": 'application/x-www-form-urlencoded',
 "Content-Length": body.length
 bracket
 
 };
 
 function callback(res){
 console.log(res.headers);
 console.log(res.statusCode)
 res.on('data',function(data){
 console.log(data.toString());
 });
 bracket
 var req=https.request(options,callback);
 
 req.write(body);
 req.end();

Error reporting:

events.js:141
 throw er;  // Unhandled 'error' event
 ^
 
 Error: connect ECONNREFUSED 127.0.0.1:443
 at Object.exports._errnoException (util.js:870:11)
 at exports._exceptionWithHostPort (util.js:893:20)
 at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1061:14)

First of all, you have to understand the error reporting and can read the error reporting tips.

Error: connect ECONNREFUSED 127.0.0.1:443

What this mistake means is127.0.0.1:443Rejected your connection

But what is accessed in the code ishttps://api.weixin.qq.comWhy?

Check yours/etc/hostsFile, isn’t itapi.weixin.qq.comTied to127.0.0.1