Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remote URL formats? #43

Open
dan-burt opened this issue Jan 9, 2019 · 1 comment
Open

Remote URL formats? #43

dan-burt opened this issue Jan 9, 2019 · 1 comment

Comments

@dan-burt
Copy link

dan-burt commented Jan 9, 2019

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...

@Jeehut
Copy link
Member

Jeehut commented Jan 9, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants