var options = { host: 'xxxxxxx.xxxxx.com', port: xxxx, path: '/xxxxx/api/downloadFile?code=' + req.query.code, method: 'GET', headers:{ 'user_id': req.headers.user_id, 'access_token': req.headers.access_token } }; var req = https.request(options, function (res) { var decoder = new StringDecoder('utf8'); res.on('data', function(chunk) { console.log(chunk) var textChunk = decoder.write(chunk); console.log(textChunk) }); }); req.end(); req.on('error', function(e) { console.error(e); });
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)