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

Response Headers while downloading files #18

Closed
wants to merge 4 commits into from

Conversation

Karrthik-Arya
Copy link

This pull request adds response headers to the DownloadResult object being returned after downloading a file. This might be useful for people who might need things like entity tags

@birdofpreyru
Copy link
Owner

Thanks @Karrthik-Arya , but after a look at it I am hesitant to merge it in for a few reasons:

  1. It looks to me that these headers already can be fetched via download begin hook. I don't see a reason to duplicate this in two places. It looks like beside the headers that begin hook returns the same information as the download promise... thus, perhaps, it makes sense to drop the begin hook altogether (as I guess it is fired at about the same time the download promise resolves), but that's not something I'd invest my time into right now (not without any financial support from anybody for this library).

  2. Your PR adds this for Android only. Thus, in addition to the previous point, in its current state it will also introduce an unnecessary difference between library API on different platforms; while the purpose of React Native is exactly the opposite — to unify APIs across platforms whenever possible.

@birdofpreyru
Copy link
Owner

I guess, for now I'll close your PR, but I've opened an issue ticket to keep a memory of it for future.

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.

2 participants