@hachibu/reliable-fetch

An easy-to-use Node.js library to make the Fetch API more reliable with timeouts, retries, and more.


Keywords
fetch, http, typescript, javascript, nodejs, promise
License
MIT
Install
npm install @hachibu/reliable-fetch@1.0.4

Documentation

Reliable Fetch npm version minzipped size coverage

An easy-to-use Node.js library to make the fetch function more reliable.

πŸ’‘ Goals

  • Unify reliability functions from multiple libraries into a single library.
  • Design and document a fluent API where users can easily discover reliability functions.
// examples/timeout.ts
import reliableFetch from '@hachibu/reliable-fetch'

async function main() {
    await reliableFetch('https://google.com').timeout({ timeout: 10 })
}

main()

⚠️ Warning

This library is currently under active design and development and should be considered a work-in-progress. This means that the API is not stable and could change without warning until we get to version 1.0.0.

πŸ“¦ Installation

Install with NPM

npm i @hachibu/reliable-fetch

Install with Yarn

yarn add @hachibu/reliable-fetch

✨️ Features

  • Timeout
  • Retry
  • Hedging
  • Random chaos

πŸ”— Links