1 | // fetch url and update charset to utf-8
|
2 | var fetchUrl = require("../lib/fetch").fetchUrl;
|
3 |
|
4 |
|
5 | fetchUrl("http://kreata.ee/iso-8859-15.php", function(error, meta, body){
|
6 | if(error){
|
7 | return console.log("ERROR", error.message || error);
|
8 | }
|
9 |
|
10 | console.log("META INFO")
|
11 | console.log(meta);
|
12 |
|
13 | console.log("BODY")
|
14 | console.log(body.toString("utf-8"));
|
15 | });
|