CSVImporter icon indicating copy to clipboard operation
CSVImporter copied to clipboard

Remote URL formats?

Open dan-burt opened this issue 5 years ago • 1 comments

How do I use the builtin remote URL function?

let importer = CSVImporter<[String]>(url: sourceURL)

What format does the "url" take? I have asked a question on SO where someone asked to use a fileURL(?) which sounds like it still requires the CSV file to be parsed to be locally on the device.

I could use your framework in conjunction with separately downloading it from the remote source, I was simply hoping the framework could handle it all...

dan-burt avatar Jan 09 '19 10:01 dan-burt

As you can see here the url initializer is only here for convenience and doesn't actually fetch anything from the internet. This is imho bad API design since it's misleading. I will keep this issue open until this API design issue is fixed.

I hope this answers your question. Unfortunately CSVImporter doesn't handle downloading content for you. Maybe this will be added sometime in the future ... feel free to add it yourself and post a PR if you have to implement it anyways, so everybody will profit.

Jeehut avatar Jan 09 '19 11:01 Jeehut