refactored

This commit is contained in:
coderaiser 2013-01-29 05:23:39 -05:00
parent 8914bb5282
commit 1907d9e700

View file

@ -75,12 +75,12 @@
res.setEncoding('utf8');
res.on('data', function (chunk) { body += chunk; });
res.on('end', function() {
pCallBack(qs.parse(body).access_token);
Util.exec(pCallBack, qs.parse(body).access_token);
});
});
req.write(data);
req.end();
req.on('error', function(e) { pCallBack(e.message); });
req.on('error', function(e) { Util.exec(pCallBack, e.message); });
}
})();