This is an incomplete snippet of code I am going to use to convert a URL into data strings.
var http = require('http');
setEncoding('utf8');
var info = http.get(process.argv, callback);
function callback (response) {
response.on("data", function (data) {
});
}
console.log(info);
The problem is that the NodeJS server I am using is returning an error "setEncoding not defined." How can I define setEncoding? It seems like a simple question, yet I could not find anything online about how to define it.
via Kyle Bolander
No comments:
Post a Comment