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

Use URL-based path resolution in HTTPStore #99

Merged
merged 6 commits into from
Aug 2, 2021
Merged

Use URL-based path resolution in HTTPStore #99

merged 6 commits into from
Aug 2, 2021

Conversation

manzt
Copy link
Collaborator

@manzt manzt commented Jul 29, 2021

In #42 we migrated from URL-based path resolution to a more simple string concatenation. This PR fixes the same issue as #42 but reverts back to using URL.

It also adds a feature requested for forwarding search query params when resolving the new URL, so that an HTTPStore can be instantiated as follows:

const store = new HTTPStore("https://example.com/data.zarr?hello=world");
store.getItem('.zarray') // requests "https://example.com/data.zarr/.zarray?hello=world"

Generally I'd be in favor of migrating the type of HTTPStore.url to URL, but since it is a public field I have set it to a generic (with default to string).

cc: @ilan-gold

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

Successfully merging this pull request may close these issues.

1 participant