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文件
答案 0 :(得分:1)
当您pipe()
时,请勿使用回调:
request.post({
url: "https://api.flipkart.com/listing/downloadListings",
form: formDataListings
}).pipe(fs.createWriteStream('download.csv'));