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

Should we support relative URLs for data sources? #57

Open
LeaVerou opened this issue Oct 16, 2023 · 0 comments
Open

Should we support relative URLs for data sources? #57

LeaVerou opened this issue Oct 16, 2023 · 0 comments
Milestone

Comments

@LeaVerou
Copy link
Contributor

LeaVerou commented Oct 16, 2023

I just removed the code that resolved relative URLs in parseURL() against location, since that broke Node (there's no location there) and we weren't actually using them.

Are they useful? If so, what should they resolve against?

We need an absolute URL to even pick a backend when using Backend.from(), but they may be useful when using the constructors directly.
E.g. if they resolve to the backend's base URL, we could do things like

let backend = new GithubFile("madatajs/madata/file.json")

Instead of today’s

let backend = new GithubFile("https://madatajs/madata/file.json")
@LeaVerou LeaVerou changed the title Should we support relative URLs? Should we support relative URLs for data sources? Oct 16, 2023
@LeaVerou LeaVerou added this to the Backlog milestone Jun 24, 2024
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

1 participant