What is Tempo?
Tempo is a 3 kB wrapper around fetch that adds retries with backoff, request deduplication and an in-memory cache. It runs in browsers, Node.js 20+, Bun and edge runtimes.
- Typed responses with
client.get<T>(). - Retries on network errors and
5xxresponses, never on4xx. - Cancellation through a standard
AbortSignal. - Interceptors for auth headers, logging and tracing.
At a glance
ts
import { createClient } from "tempo-http";const api = createClient({ baseUrl: "https://api.example.com" });const user = await api.get<User>("/users/42");When not to use it
Tempo is for JSON APIs. For uploads with progress, streams you read chunk by chunk or a GraphQL client with normalized caching, use fetch directly or a tool made for that job.
Browser support
Any browser with native fetch and AbortController: every evergreen browser released since 2020.