I am connecting to a website via the following code using NodeJS:
request({
method: 'GET',
url: 'https://www.huffingtonpost.com/',
}, function(error, response, body) {
if(error) {
console.log(error);
}
huffpost(body);
});
When I run the code from my html file using Browserify, I get the following error in my Javascript console:
No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
I have seen other questions relating to this topic, and they all say to add a "header", but after looking for a while, I still don't understand.
Any and all help is appreciated, and I would be happy to provide any more info.