var rp = require('request-promise');
var co = require('co');
// 取消报警
require('events').EventEmitter.prototype._maxListeners = 100000;
co(function *() {
for (var i = 0; i < 10; i++) {
var result = yield rp('http://xxxxxxxx');
var resultStr = result.indexOf("body")>0?"OK":"ERROR"
console.log(resultStr+"---"+i);
}
})
nodejs 网页测试代码
最新推荐文章于 2024-03-13 22:12:08 发布