fancy-fetch

simple wrapper around isomorphic-fetch

Usage no npm install needed!

<script type="module">
  import fancyFetch from 'https://cdn.skypack.dev/fancy-fetch';
</script>

README

fancy-fetch

Usage

  import fetch from 'fancy-fetch'

  fetch({
    url: 'http://server.com/api/endpoint/or/something',
    method: 'put',
    body: {
      keys: values
    },
    success: function() {},
    error: function() {}
  })

The only thing special about this helper is that it provides a success and error callback. All other options are passed along to isomorphic-fetch, which is another wrapper around github's polyfill for whatwg spec of fetch.

Compile

npm run compile

For now, let's keep the compiled builds in the project until we get a npm prepublish.