我如何将流写入 csv 文件 - node.js
How do i write a stream to csv file - node.js
request.post({url: "https://api.flipkart.com/listing/downloadListings",form: formDataListings}, function(e,r,body){
var fs = require('fs');
var writeStream = fs.createWriteStream('download.csv');
body.pipe(writeStream);
})
我想存储csv流并下载csv文件
当您 pipe()
时,不使用回调:
request.post({
url: "https://api.flipkart.com/listing/downloadListings",
form: formDataListings
}).pipe(fs.createWriteStream('download.csv'));
request.post({url: "https://api.flipkart.com/listing/downloadListings",form: formDataListings}, function(e,r,body){
var fs = require('fs');
var writeStream = fs.createWriteStream('download.csv');
body.pipe(writeStream);
})
我想存储csv流并下载csv文件
当您 pipe()
时,不使用回调:
request.post({
url: "https://api.flipkart.com/listing/downloadListings",
form: formDataListings
}).pipe(fs.createWriteStream('download.csv'));