INNER CODE UNIT · JavaScript
Promise
cporter202/agentic-ai-apis · settings/fetch_apify_actors.js:20
return new Promise((resolve, reject) => {
const options = {
hostname,
path: requestPath,
method: 'GET',
headers: {
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36',
},
};
const req = https.request(options, (res) => {
let data = '';
res.on('data', (chunk) => {
data += chunk;
});
res.on('end', () => {