This table aims to provide an accurate comparison of fetch libraries, though there may be room for improvement. If you notice any discrepancies or have additional information to share, please submit a PR with supporting documentation.
Legend:
- ✅ Supported
- 🟧 Partially supported
- ❌ Not supported or not documented
Feature | up-fetch | ofetch | wretch | ky |
---|---|---|---|---|
Minzipped Size | ||||
Automatic Body Handling | ✅ | ✅ | ✅ | ✅ |
Automatic Params Handling | ✅ | ✅ | ✅ | ✅ |
Automatic Response Parsing | ✅ | ✅ | ✅ | ✅ |
Custom Body Serializer | ✅ | ❌ | ❌ | ❌ |
Custom Error Parser | ✅ | ❌ | 🟧 | ❌ |
Custom Error Throwing | ✅ | ❌ | ❌ | ✅ |
Custom Fetch Implementation | ✅ | ❌ | ❌ | 🟧 (1) |
Custom Params Serializer | ✅ | ❌ | ❌ | ❌ |
Custom Response Parser | ✅ | ✅ | 🟧 | 🟧 |
Dynamic Default Headers | ✅ | 🟧 | 🟧 | 🟧 |
Extendable instance | ❌ | ❌ | ✅ | ✅ |
Hooks/Interceptors | ✅ | ✅ | ✅ | ✅ |
Instance Configuration | ✅ | ✅ | ✅ | ✅ |
Retry | ❌ | ✅ | ✅ | ✅ |
Schema Validation | ✅ | ❌ | ❌ | ❌ |
Timeout | ✅ | 🟧 (2) | ✅ | ✅ |
Zero Dependencies | ✅ | ❌ | ✅ | ✅ |
(1) fetch type is not inferred
(2) timeout can't be used together with signal as per ofetch 1.4.1