1.1.0 • Published 11 months ago

fetchtastic v1.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

🌩️ Fetchtastic

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

GitHub issues GitHub commit activity bundle.js npm npm

Features
🪶LightweightLess than 3kB 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 fveracoechea.github.io/fetchtastic to view the full documentation.

⚡Getting Started

npm install fetchtastic

Fetchtastic is built on standard web APIs and runs everywhere fetch is available.

  • Modern browsers
  • Node.js >= v18
  • Deno
  • Service Workers
  • Netlify Edge Functions
  • Vercel Edge Functions
  • and more...

Basic usage

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

const blogPosts = await api
  .get('/posts')
  .setSearchParams({ page: 1, per_page: 12 })
  .json();

await api.url('/albums').post({ 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.

1.1.0

11 months ago

1.0.0

12 months ago

0.3.5

1 year ago

0.3.0

1 year ago

0.3.2

1 year ago

0.3.1

1 year ago

0.3.4

1 year ago

0.3.3

1 year ago

0.2.1

2 years ago

0.2.2

2 years ago

0.2.0

2 years ago

0.1.4

2 years ago

0.1.6

2 years ago

0.1.5

2 years ago

0.1.3

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago