phantasy-fetch
v0.1.1
Published
Fetch implementation using Phantasy data types
Downloads
1
Readme
phantasy-fetch
Fetch implementation for Node using Phantasy data types
Installation
$ npm install --save phantasy-fetch
or
$ yarn add phantasy-fetch
Usage
import { FETCH, fetch } from 'phantasy-fetch';
import defaultFetch from 'phantasy-fetch';
// construct the request
let request = {
method: 'GET',
url: 'http://www.google.com/'
};
// generate the effectful Task
fetch(request)
.runEff({ FETCH }) // handle effects
.runTask( // run the resulting Task
response => console.log(response),
err => console.error(err)
);