Hello everyone , I am trying to retrieve data from a REST API in the server side (*.js) and display it in my view (*.jade)
I was able to get the data but was not able to send it to the view . This is how my code looks like : var reqGet = https.request(optionsget, function(res) { console.log("statusCode: ", res.statusCode); res.on('data', function(d) { console.info('GET result:\n'); BugData =d ; console.log(d); }); }); reqGet.end(); BugData (was defined before )is the variable i am trying to send to the view but for some reasons it is empty and does not contain the variable 'd' Does anyone know why or how can i solve this ? Thanks -- Job board: http://jobs.nodejs.org/ New group rules: https://gist.github.com/othiym23/9886289#file-moderation-policy-md Old group rules: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines --- You received this message because you are subscribed to the Google Groups "nodejs" group. To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+unsubscr...@googlegroups.com. To post to this group, send email to nodejs@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/nodejs/a397f2eb-6408-40c7-b686-244f8c8cef2f%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.