Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

urlSource.options is ignored #2807

Closed
mariotaku opened this issue Feb 10, 2020 · 6 comments
Closed

urlSource.options is ignored #2807

mariotaku opened this issue Feb 10, 2020 · 6 comments
Labels
kind/bug A bug in existing code (including security flaws) kind/enhancement A net-new feature or improvement to an existing feature

Comments

@mariotaku
Copy link

https://github.com/ipfs/js-ipfs-utils/blob/e582304334584c2c076ee87a85063f6e0dd7c740/src/files/url-source.js#L9

Should this options to be passed to ky.get(url, options)?

@achingbrain
Copy link
Member

According to the API docs, urlSource does not support any options - see 'Importing a file from a URL' here: SPEC/FILES.md so the second argument to that function should probably be removed.

Is there something specific you're trying to do?

@mariotaku
Copy link
Author

@achingbrain Yes. For example, if a url needs credentials to be downloaded, passing headers/cookies directly without having to make requests manually.

@achingbrain
Copy link
Member

Sounds fair enough - would you like to submit a PR with a test or two that fixes the bug?

@mariotaku
Copy link
Author

@achingbrain Sure! I'd love to do that, and I'll learn to write test for urlSource.

@achingbrain achingbrain transferred this issue from ipfs/js-ipfs-utils Mar 2, 2020
@achingbrain achingbrain added kind/bug A bug in existing code (including security flaws) kind/enhancement A net-new feature or improvement to an existing feature status/blocked Unable to be worked further until needs are met labels Mar 11, 2020
@achingbrain
Copy link
Member

This is blocked on #2810

@achingbrain achingbrain removed the status/blocked Unable to be worked further until needs are met label Mar 26, 2020
@jacobheun
Copy link
Contributor

The latest version of js-ipfs-utils now passes the options, this should no longer be an issue.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug A bug in existing code (including security flaws) kind/enhancement A net-new feature or improvement to an existing feature
Projects
None yet
Development

No branches or pull requests

3 participants