A lightweight, flexible HTTP client library with powerful interceptors, auto retry, and smart caching for modern web applications. Simple setup, full TypeScript support, and developer control.
npm install hyperwiz
import { createClient } from 'hyperwiz';
const api = createClient('https://api.example.com', {
logging: true,
retry: true,
cache: true
});
const users = await api.get('/users');
const newUser = await api.post('/users', { name: 'John' });
Built for modern web applications with simplicity, flexibility, and developer experience in mind.
One-line client creation with zero configuration needed. Get started in minutes, not hours.
Add request/response/error handlers with powerful interceptor system for complete control.
Adaptive backoff with exponential delay and intelligent retry logic for reliable requests.
In-memory or IndexedDB caching with automatic expiration and intelligent cache management.
Works with credentials and cross-origin requests for session-based authentication.
Full TypeScript support with excellent IntelliSense and type safety throughout.
Explore real-world examples and get started with HyperWiz in minutes.
import { createClient } from 'hyperwiz';
const api = createClient('https://api.example.com');
// GET request
const users = await api.get('/users');
// POST request
const newUser = await api.post('/users', {
name: 'John',
email: 'john@example.com'
});
// PUT request
const updatedUser = await api.put('/users/1', {
name: 'John Updated'
});
// DELETE request
const deleted = await api.delete('/users/1');
const api = createClient('https://api.example.com', {
retry: {
maxRetries: 3,
retryDelay: 1000,
backoffMultiplier: 2
},
logging: true
});
// Add token interceptor
api.addBefore((config, url) => {
const token = localStorage.getItem('token');
if (token) {
return {
...config,
headers: {
...config.headers,
'Authorization': `Bearer ${token}`
}
};
}
return config;
});
// All requests automatically retry and include tokens
const profile = await api.get('/user/profile');
const api = createClient('https://api.example.com', {
cache: {
enabled: true,
maxAge: 5 * 60 * 1000, // Cache for 5 minutes
maxSize: 50, // Maximum 50 cached items
storage: 'indexeddb', // Use IndexedDB for persistence
includeQueryParams: true // Include query params in cache key
},
logging: true
});
// First request: fetches from server
const users1 = await api.get('/users'); // ⏳ Network request
// Second request: served from cache (instant)
const users2 = await api.get('/users'); // 💾 Cache hit (instant)
// Cache automatically expires after maxAge
// Cache automatically evicts old entries when maxSize is reached
Join thousands of developers using HyperWiz for simple, flexible, and reliable HTTP requests with smart caching.
Or install it right now:
npm install hyperwiz