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

Add fetch support #8

Merged
merged 3 commits into from
Mar 27, 2018
Merged

Add fetch support #8

merged 3 commits into from
Mar 27, 2018

Conversation

stushurik
Copy link
Collaborator

@curran @irfanalidv please review.
Closes #7

Copy link
Collaborator

@curran curran left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

text: function(){ return Promise.resolve(responseText) },
json: function(){ return Promise.resolve(responseText).then(JSON.parse) },
blob: function(){ return Promise.resolve(new Blob([responseText])) },
arrayBuffer: function() {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure we need to support arrayBuffer. In any case the source for this code should be cited https://developers.google.com/web/updates/2012/06/How-to-convert-ArrayBuffer-to-and-from-String

@micahstubbs
Copy link

micahstubbs commented Mar 26, 2018

✅ looks good to me

I see this when I checkout the branch feature/add-fetch-support and visit the test page at index.html
feature add-fetch-support-1

@curran
Copy link
Collaborator

curran commented Mar 27, 2018

Thanks @micahstubbs !

@curran curran merged commit 1a715e9 into master Mar 27, 2018
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.

3 participants