developit/redaxios

add custom 'fetch' support (as config param?)

lifeart opened this issue ยท 9 comments

We have isomorphic fetch for ember - https://github.com/ember-cli/ember-fetch it working in node & browser to bring smooth SSR experience, I whould like to have redaxios, with ember-fetch support

Would be interested, too, so that I can use it under node as well using node-fetch.
When Iโ€˜m back at my notebook, I can create a pull request though

Any reason it's not possible to install your fetch polyfill globally? I realize it's not elegant, but global.fetch=fetch does work.

@developit it's possible, but not clean and hard to mock/test/maintain

I would definitely be interested in supporting this as long as the size impact is minimal. Adding it here would make it configurable both per-instance (axios.create({fetch})) and per-request (axios.get('',{fetch})).

Hi!
Can I give this a try? Seems an easy, useful issue.

Yeah, go ahead @crissto!

@developit @crissto thank you for your work!
Any estimates about new release?

Merged! will release today.

Apologies for the wait! I spent too much time refactoring and shaving bytes off last week. Just published version 0.3.0 which includes custom fetch support.