(options)
| 59 | |
| 60 | // Utility: Make HTTPS request |
| 61 | const httpsRequest = (options) => { |
| 62 | return new Promise((resolve, reject) => { |
| 63 | https.get(options, (response) => { |
| 64 | const chunks = []; |
| 65 | |
| 66 | response.on('data', (chunk) => chunks.push(chunk)); |
| 67 | response.on('end', () => resolve(Buffer.concat(chunks))); |
| 68 | response.on('error', reject); |
| 69 | }).on('error', reject); |
| 70 | }); |
| 71 | }; |
| 72 | |
| 73 | // Utility: Download file |
| 74 | const downloadFile = (filePath, url) => { |
no test coverage detected