Back to recipes

Documentation site · reference build

TTempov2.4.1

Getting started

  • Introduction
  • Installation
  • Quick start

Core concepts

  • Requests
  • InterceptorsNew
  • Cancellation

API reference

  • createClient
  • retry
  • cache
  • TempoError

Guides

  • Error handling
  • Testing
  • Migrating from v1

Resources

  • Changelog
⌘B
  1. Docs
v2.4Interceptors are here

Tempo documentation

A 3 kB fetch client with retries, caching and typed responses. Runs in browsers, Node.js, Bun and edge runtimes.

Quick startAPI reference

Install

npm install tempo-http
pnpm add tempo-http
bun add tempo-http
yarn add tempo-http

Browse the docs

Getting started

  • IntroductionWhat Tempo is, and when to reach for it.
  • InstallationAdd Tempo to a project with your package manager.
  • Quick startMake your first request in five minutes.

Core concepts

  • RequestsMethods, paths, query strings and bodies.
  • InterceptorsNewChange every request and response in one place.
  • CancellationStop requests nobody is waiting for.

API reference

  • createClientCreate a configured client instance.
  • retryRetry policies and backoff strategies.
  • cacheCache GET responses in memory.
  • TempoErrorThe error every failed request rejects with.

Guides

  • Error handlingCatch, inspect and recover from failed requests.
  • TestingSwap the network for a stub in unit tests.
  • Migrating from v1Move from the global client to createClient.

Resources

  • ChangelogWhat changed in each release.