Smart, ultra-lightweight HTTP fetch wrapper that simplifies API calls with automatic retries, TTL memory cache, concurrent request deduplication, and timeouts in one elegant line of code.
npm install owofetch-core
import owo from "owofetch-core";
// Simple GET request (automatically caches and deduplicates)
const user = await owo.get("https://jsonplaceholder.typicode.com/posts/1");
console.log(user);
// Simple POST request
const newPost = await owo.post("https://jsonplaceholder.typicode.com/posts", {
title: "Hello OwO",
body: "Simplifying HTTP requests like a charm."
});
console.log(newPost);
// Override default settings per request
const data = await owo.get("https://jsonplaceholder.typicode.com/posts/1", {
timeout: 3000, // 3 seconds timeout
retries: 5 // Retry 5 times on network failure
});
// Enable logging to track cache and request hits in the console
owo.enableDebug();