Skip to content

kitojs/otik

Repository files navigation



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.

πŸš€ Quick Start

Install Otik with your favorite package manager:

pnpm add otik   # Or: npm i otik

Minimal Example

import { Client } from "otik";
const client = new Client();

const res = await client.get("https://jsonplaceholder.typicode.com/todos/1");
console.log(res);

Schemas and Deserialization

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!

πŸ“š Documentation

Full docs available at the official website. You can also explore ready-to-run examples.


🀝 Contributing

We welcome contributions! Check the contributing guide to learn how to set up your environment and submit pull requests.


πŸ“„ License

Licensed under the MIT License.


About

🦊 The high-performance, type-safe and modern TypeScript HTTP client written in Rust.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors