@zimic/fetch
Version:
Next-gen TypeScript-first Fetch client
64 lines (45 loc) • 2.82 kB
Markdown
<p align="center">
<img src="../../docs/zimic.png" align="center" width="100px" height="100px">
</p>
<h1 align="center">
/fetch
</h1>
<p align="center">
Next-gen TypeScript-first Fetch client
</p>
<p align="center">
<a href="https://www.npmjs.com/package/@zimic/fetch">npm</a>
<span> • </span>
<a href="https://zimic.dev">Docs</a>
<span> • </span>
<a href="https://zimic.dev/docs/examples">Examples</a>
<span> • </span>
<a href="https://github.com/zimicjs/zimic/issues">Issues</a>
<span> • </span>
<a href="https://github.com/orgs/zimicjs/projects/1/views/4">Roadmap</a>
</p>
<div align="center">
[](https://github.com/zimicjs/zimic/actions/workflows/ci.yaml)
[](https://github.com/zimicjs/zimic/actions)
[](https://github.com/zimicjs/zimic/blob/canary/LICENSE.md)
[](https://github.com/zimicjs/zimic)
[](https://www.npmjs.com/package/@zimic/fetch)
[](https://bundlephobia.com/package/@zimic/fetch)<br />
</div>
---
`/fetch` is a minimal (~2 kB minified gzipped) and type-safe `fetch`-like API client.
## Highlights
- :zap: **Type-safe `fetch`**
Use your [`/http` schema](https://zimic.dev/docs/http/guides/schemas) to create a type-safe
[`fetch`-like](https://developer.mozilla.org/docs/Web/API/Fetch_API) API client and have your requests and responses
fully typed by default.
- :sparkles: **Zero dependencies**
`/fetch` has no external dependencies, making it a lightweight and fast alternative to other HTTP clients.
- :muscle: **Developer experience**
Define default options to apply to your requests, such as a base URL, headers, search parameters, and more. Inspect
and modify requests and responses using [`onRequest`](https://zimic.dev/docs/fetch/api/fetch#onrequest) and
[`onResponse`](https://zimic.dev/docs/fetch/api/fetch#onresponse) listeners.
**Learn more**:
- [`/fetch` - Getting started](https://zimic.dev/docs/fetch/getting-started)
- [`/fetch` - Guides](https://zimic.dev/docs/fetch/guides)
- [`/fetch` - API](https://zimic.dev/docs/fetch/api)