D:\node\weishi>node post problem with request: 8820:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:un known protocol:openssl\ssl\s23_clnt.c:766:
代码 var https = require(‘https’); var options = { hostname: ‘open.t.qq.com’, port: 80, path: ‘/api/auth/token’, method: ‘POST’ }; var req = https.request(options, function (response) { var str = ‘’; response.on(‘data’, function (data) { str = str + data; }); response.on(‘end’, function () { console.log(str); }); }); req.on(‘error’, function (e) { console.log('problem with request: ’ + e.message); }); //req.write(""); req.end();