标签:nbsp node com col util car .com class ons
var http = require(‘http‘); let util = require(‘util‘); http.get(‘http://www.imooc.com/u/card‘,function (res) { let data = ‘‘; res.on("data",function (chunk) { data += chunk; //累计循环数据 }) ; res.on("end",function () { let result = JSON.parse(data); console.log("result:"+util.inspect(result)) }); });
标签:nbsp node com col util car .com class ons
原文地址:http://www.cnblogs.com/qiaohong/p/7705331.html