修改报错

This commit is contained in:
qxa 2024-02-21 16:51:06 +08:00
parent 7ae4f66019
commit fe1e05752c
2 changed files with 14 additions and 14 deletions

14
dist/index.js vendored
View File

@ -1411,15 +1411,15 @@ urls.forEach(item => {
// 创建HTTP客户端并发送POST请求
const req = request(item, options, (res) => {
let data = '';
// let data = '';
res.on('data', (chunk) => {
data += chunk;
});
// res.on('data', (chunk) => {
// data += chunk;
// });
res.on('end', () => {
console.log(`服务器返回结果:${data}`);
})
// res.on('end', () => {
// console.log(`服务器返回结果:${data}`);
// })
})
req.write(template) // 将POST请求参数写入请求流中

View File

@ -20,15 +20,15 @@ urls.forEach(item => {
// 创建HTTP客户端并发送POST请求
const req = request(item, options, (res) => {
let data = '';
// let data = '';
res.on('data', (chunk) => {
data += chunk;
});
// res.on('data', (chunk) => {
// data += chunk;
// });
res.on('end', () => {
console.log(`服务器返回结果:${data}`);
})
// res.on('end', () => {
// console.log(`服务器返回结果:${data}`);
// })
})
req.write(template) // 将POST请求参数写入请求流中