
High-performance, fully type-safe, and modern HTTP client for TypeScript. Powered by Rust for extremely speed, automatic deserialization, and zero bloat.
- Extreme performance โ Rust core with Tokio for massively fast & efficient HTTP requests. See the benchmarks.
- Type-safe โ full TypeScript support with end-to-end type safety and great DX.
- Automatic deserialization โ JSON responses mapped directly into your TypeScript schemas.
- Efficient streaming โ handle large responses as streams directly from Rust, without buffering the whole body in memory.
- First-class concurrency โ built-in support for batching, pooling, and cancellation of requests, leveraging Rustโs async engine.
- Zero dependencies โ no dependencies, no bloat.
- Cross-platform โ works seamlessly on Node.js, Bun, and Deno.
Install Otik with your favorite package manager:
pnpm add otik # Or: npm i otik
import { Client } from "otik";
const client = new Client();
const res = await client.get("https://jsonplaceholder.typicode.com/todos/1");
console.log(res);
import { t, Client } from "otik";
const client = new Client();
const User = t.object({
id: t.number(),
name: t.string(),
email: t.string(),
});
const user = await client.get("https://jsonplaceholder.typicode.com/users/1", User);
console.log(user.name); // 100% type-safe and automatically deserialized!
Full docs available at the official website. You can also explore ready-to-run examples.
We welcome contributions! Check the contributing guide to learn how to set up your environment and submit pull requests.
Licensed under the MIT License.