I cannot read content from a url with this code

nodejs

#1

var request = require(‘request’);
request(host+’/api/page/’+ req.params.id, function (error, response, body) {…

when I do this, it reads a default c9 page and takes the content to "body"
however the code is running find on my production server in AWS.


#2

Are you running this in browser or on the server, what is the value of host? This issue doesn’t sound like something related to cloud9.