Keyang / node-csvtojson

Blazing fast and Comprehensive CSV Parser for Node.JS / Browser / Command Line.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Read csv from URL

Valentine-Mario opened this issue · comments

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

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);