Available Clients
Fetch
Native browser Fetch API client. Zero dependencies, works everywhere.
Axios
Popular HTTP client with request/response interceptors and advanced features.
Angular
Native Angular HttpClient integration with dependency injection support.
Ky
Tiny, elegant HTTP client built on the Fetch API with retry support.
Next.js
Optimized for Next.js with server components and caching support.
Nuxt
Native Nuxt integration with composables and SSR support.
ofetch
Universal fetch wrapper with advanced features and interceptors.
Custom
Build your own client adapter for any HTTP library.
Quick Comparison
| Client | Use Case | Key Features | Bundle Size |
|---|---|---|---|
| Fetch | Universal | Native API, zero deps | ~2KB |
| Axios | Node.js, advanced | Interceptors, cancellation | ~13KB |
| Angular | Angular apps | DI, RxJS observables | N/A |
| Ky | Modern browsers | Retry, timeout, hooks | ~5KB |
| Next.js | Next.js apps | Server components, caching | ~2KB |
| Nuxt | Nuxt apps | Composables, SSR | N/A |
| ofetch | Universal | Advanced features, hooks | ~3KB |
| Custom | Any library | Full control | Varies |
Common Features
All clients share these core capabilities:Type Safety
Configuration
All clients support a common configuration interface:Authentication
Built-in support for API key and HTTP authentication:Request/Response Interceptors
Most clients support interceptors for request and response transformation:Server-Sent Events (SSE)
All clients support SSE for real-time data streaming:Response Styles
Most clients support two response styles:Fields Style (Default)
Returns an object withdata, error, request, and response fields:
Data Style
Returns only the data (or undefined on error):Error Handling
Two approaches to error handling:Check error field (default)
Throw errors
Choosing a Client
Consider your framework
If you’re using Angular, use
@hey-api/client-angular. For Next.js, use @hey-api/client-next. For Nuxt, use @hey-api/client-nuxt.Evaluate dependencies
If you want zero dependencies, use
@hey-api/client-fetch. If you already use Axios, use @hey-api/client-axios.Check feature requirements
Need retry logic? Use
@hey-api/client-ky. Need advanced Node.js features? Use @hey-api/client-ofetch.Next Steps
Get Started
Start with the Fetch client
Configuration
Learn about client configuration
Authentication
Set up API authentication
Interceptors
Add request/response interceptors