0.1.1 • Published 7 years ago

phantasy-fetch v0.1.1

Weekly downloads
1
License
MIT
Repository
github
Last release
7 years ago

phantasy-fetch

Build Status

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)
	);