Skip to content

kitojs/otik

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

27 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

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

No packages published