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

Caching for Blob object #108

Merged
merged 7 commits into from
Mar 24, 2020
Merged

Caching for Blob object #108

merged 7 commits into from
Mar 24, 2020

Conversation

kygoh
Copy link
Contributor

@kygoh kygoh commented Mar 4, 2020

Added a method to cache request that returns blob object.

Use case:

	const image = document.createElement('img');

	const request = this.httpClient.get(imageURL, {responseType: 'blob'});

	this.cache.loadFromBlobObservable(imageURL, request)
	.subscribe(response => image.src =  URL.createObjectURL(response));

@Nodonisko
Copy link
Owner

Thanks, looks great!

@Nodonisko Nodonisko merged commit 0e97e20 into Nodonisko:master Mar 24, 2020
@kygoh kygoh deleted the cache-blob branch March 25, 2020 09:21
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