0.3.5 • Published 4 days ago

fetchtastic v0.3.5

Weekly downloads
-
License
MIT
Repository
github
Last release
4 days ago

🌩️ Fetchtastic

Small wrapper around fetch designed to perform more predictable and type-safe network requests.

GitHub issues GitHub commit activity bundle.js npm npm

Features
🪶Lightweight3kB gzipped
🧩ComposableSafely reuse previous configurations
IntuitiveClean and easy to use API
🛡️Type safeStrongly typed, written in TypeScript
🛠️IsomorphicCompatible with modern browsers, Node.js and Deno
Well TestedCovered by unit tests

📖 Documentation

Visit fetchtastic-docs.vercel.app to view the full documentation.

Getting Started

npm

npm install fetchtastic

pnpm

pnpm add fetchtastic

yarn

yarn add fetchtastic

deno

import { fetchtastic } from 'https://deno.land/x/fetchtastic/lib/mod.ts';

Basic usage

const api = new Fetchtastic('https://jsonplaceholder.typicode.com')
  .setOptions({ cache: 'default', mode: 'cors' })
  .headers({
    Accept: 'application/json',
    'Content-Type': 'application/json',
  });

const blogData = await api
  .searchParams({ page: 1, per_page: 12 })
  .get('/posts')
  .json(PostSchema.parse);

await api.post('/albums', { title: 'My New Album' }).resolve();

Contributing

Contributions are welcome and highly appreciated. However, before you jump right into it, we would like you to review our Contribution Guidelines to make sure you have a smooth experience.

0.3.5

4 days ago

0.3.0

8 days ago

0.3.2

8 days ago

0.3.1

8 days ago

0.3.4

8 days ago

0.3.3

8 days ago

0.2.1

5 months ago

0.2.2

5 months ago

0.2.0

10 months ago

0.1.4

11 months ago

0.1.6

11 months ago

0.1.5

11 months ago

0.1.3

12 months ago

0.1.2

12 months ago

0.1.1

12 months ago

0.1.0

12 months ago