Skip to content
/ fetch Public

This library is a wrapper of the fetch API to use with Tasks instead of promises.

License

Notifications You must be signed in to change notification settings

ts-task/fetch

Repository files navigation

Tasks Fetch

This library is a wrapper of the fetch API to use with Tasks instead of promises.

Use

Install it

npm i @ts-task/fetch

Use it

import { fetch } from '@ts-task/fetch';

fetch('https://jsonplaceholder.typicode.com/todos/1')
  .chain(response => response.json())
  .fork(
      err => console.error('Oh no', err),
      json => console.log(json)
    )
;

About

This library is a wrapper of the fetch API to use with Tasks instead of promises.

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published