0.0.4 • Published 10 months ago
fecho v0.0.4
fetcho
A fetch wrapper with typesafe and easy to use.
Install
npm install fetcho
yarn add fetcho
pnpm add fetcho
Usage
import { fetcho } from 'fetcho';
type User = {
id: number;
name: string;
};
const response = await fetcho<User>(
'https://jsonplaceholder.typicode.com/users/1',
);
console.log(response.data); // { id: 1, name: 'Leanne Graham' }