Every request,
under control.
From your first Fetch call to production workflows.
Type safety, streaming and composable resilience in one lightweight client.
import { createClient } from '@npora/request/core'
import { retryPlugin } from
'@npora/request/plugins/retry'
const api = createClient({ baseURL: '/api' })
.use(retryPlugin({ retries: 2 }))
// Less boilerplate. More certainty.
interface User { id: number; name: string }
const user = await api.get<User>('/user')
console.log(user.name)
{ "id": 1, "name": "Npora" }Install. Run. Meet your response.
- Install in a Node.js 22+ project.
npm i @npora/request - Save the example as first-request.mjs.
- Run it from the same project.
node first-request.mjs
This Node.js example uses our public demo API. In a browser app, use your own same-origin /api or a backend that allows your origin through CORS.
Continue with TypeScript and validation ↗import { createClient } from '@npora/request/core'
const api = createClient({
baseURL: 'https://www.npora.live/api',
timeout: 5000
})
const user = await api.get('/user')
console.log(user.name)See your requests in action.
Every click sends real requests. Watch failures, recovery and each chunk as it arrives.
Run a scenario to see real responses.Requests 0
| Method / path | Status | Duration |
|---|---|---|
| Actual requests will appear here after you run a scenario. | ||
This demo deliberately triggers failures: schema rejection, timeouts and rate limits are expected. Uploads use a 1 MiB sample (2 MiB maximum per request); uploaded files are not stored.
Choose the right client.
A transparent snapshot against current stable clients, measured on November 20, 2026.
| Client / version | GET JSON · req/s | 64 KiB JSON · req/s | Browser gzip |
|---|---|---|---|
| @npora/request 1.23.3 | 14,510 | 4,269 | 14.8 KB |
| Axios 1.21.1 · Fetch | 8,214 | 3,308 | 22.3 KB |
| Ky 2.2.0 | 11,604 | 3,930 | 11.7 KB |
| ofetch 1.5.1 | 14,624 | 3,859 | 4.1 KB |
Npora 1.23.3 · Node 24.18.0 · Apple M3 · loopback HTTP · concurrency 32 · six rotated rounds. Retries and configurable timeouts disabled. Browser bundles: esbuild 0.28.2, ES2020, gzip level 9. These results do not rank production or browser network performance.
Ky also supports Standard Schema, QUERY and transfer progress. Npora focuses on incremental SSE/NDJSON validation and composed request lifecycles. Got and Undici target Node transport needs; SuperAgent offers mature forms and transfers. They were reviewed, not benchmarked here.
Methodology and raw results ↗Less glue code. More building.
The essentials fit together, from a single call to your whole application.
Make boundaries explicit.
Generics describe expectations. Standard Schema validates real data. Errors include stable codes and specific field paths.
Consume data as it arrives.
Consume SSE and NDJSON incrementally, with async iteration, cancellation and backpressure built on web standards.
Compose what you need.
Add retries, authentication, circuit breakers and traffic control through optional plugins around a lightweight core.
A real response. Your next test.
Capture a demo response and turn it into a reusable MockAdapter fixture. Less time writing sample JSON, more time testing what matters.
- 01Record
A real request to the public demo API.
- 02Review
Common credentials and wire headers are filtered.
- 03Replay
Copy a replyOnce fixture into your test.
const mock = new MockAdapter({
record: { adapter: new FetchAdapter() }
})
// Record a response to generate your fixture.Demo data only. Kept in this tab. Nothing is saved to a file.