-
-
Notifications
You must be signed in to change notification settings - Fork 369
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 option for custom fetch
implementation
#273
Conversation
Definitely need some help with the tests as I don't have any experience with ava or whatever you're using here |
Give it a try and we'll be happy to help if you get stuck. https://github.com/avajs/ava/blob/master/docs/01-writing-tests.md |
The tests for this feature should go in here: You can run the tests in that file with a command like this: npx ava test/fetch.js Or to run all of the tests: npx ava |
…hed to this._options.fetch
Just took the other test in |
@sholladay @sindresorhus Is this ready to merge? |
fetch
implementation
and removed .serial()
…with the standard
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. :)
@sholladay yup! Ready to merge on my side 🚀 |
fetch
implementationfetch
implementation
I think the travis build is broken @sholladay |
Hmm. The logs on Travis indicate that the build completed successfully, but for some reason GitHub shows the build as still running. |
As requested in #269, this PR adds the ability to pass a
fetch
option when creating a ky instance.This allows to use custom fetch implementations like isomorphic-unfetch or when using SSR in some frameworks (Sapper in my case).
TODO
Fixes #269