Simply Enhanced Fetch API. Inspired from r2.
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.vscode chore: initial commit Jan 11, 2019
src fix: index functions Jan 11, 2019
test fix: index functions Jan 11, 2019
.gitignore
README.md
README_ko_kr.md
package-lock.json release: v1.0.0 Jan 11, 2019
package.json
tsconfig.json chore: initial commit Jan 11, 2019
tslint.json

README.md

Refetch

Refetch is Simple HTTP Client by Fetch API. And Heavily inspired from r2.

Usage

npm install --save @hazelee/refetch
import refetch from '@hazelee/refetch'

// in async function...
const result = await refetch('https://api.github.com/repos/hazealign/refetch', { method: 'get' }).json()
const result2 = await refetch.get('https://api.github.com/repos/hazealign/refetch').json()

Why?

R2 is awesome project. But it isn't friendly with TypeScript. Refetch is written with TypeScript, and It also works well with plain JavaScript too.

Links