node-csvtojson icon indicating copy to clipboard operation
node-csvtojson copied to clipboard

Read csv from URL

Open Valentine-Mario opened this issue 3 years ago • 1 comments

Reading CSV files from URL seems like a feature that should be supported. Can't seem to find it

Valentine-Mario avatar Dec 23 '21 08:12 Valentine-Mario

It seems is supported, read the docs

const request=require('request')
const csv=require('csvtojson')
 
csv()
.fromStream(request.get('http://mywebsite.com/mycsvfile.csv'))
.subscribe((json)=>{
    return new Promise((resolve,reject)=>{
        // long operation for each json e.g. transform / write into database.
    })
},onError,onComplete);

jfoclpf avatar Jan 09 '22 22:01 jfoclpf