Giter VIP home page Giter VIP logo

fetchtastic's Introduction

๐ŸŒฉ๏ธ 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
๐Ÿชถ Lightweight 3kB gzipped
๐Ÿงฉ Composable Safely reuse previous configurations
โšก Intuitive Clean and easy to use API
๐Ÿ›ก๏ธ Type safe Strongly typed, written in TypeScript
๐Ÿ› ๏ธ Isomorphic Compatible with modern browsers, Node.js and Deno
โœ… Well Tested Covered 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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.