got |
request |
node-fetch |
ky |
axios |
superagent |
|
---|---|---|---|---|---|---|
HTTP/2 support | ✔️¹ | ❌ | ❌ | ❌ | ❌ | ✔️** |
Browser support | ❌ | ❌ | ✔️* | ✔️ | ✔️ | ✔️ |
Promise API | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |
Stream API | ✔️ | ✔️ | Node.js only | ❌ | ❌ | ✔️ |
Pagination API | ✔️ | ❌ | ❌ | ❌ | ❌ | ❌ |
Request cancelation | ✔️ | ❌ | ✔️ | ✔️ | ✔️ | ✔️ |
RFC compliant caching | ✔️ | ❌ | ❌ | ❌ | ❌ | ❌ |
Cookies (out-of-box) | ✔️ | ✔️ | ❌ | ❌ | ❌ | ❌ |
Follows redirects | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |
Retries on failure | ✔️ | ❌ | ❌ | ✔️ | ❌ | ✔️ |
Progress events | ✔️ | ❌ | ❌ | ✔️*** | Browser only | ✔️ |
Handles gzip/deflate | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |
Advanced timeouts | ✔️ | ❌ | ❌ | ❌ | ❌ | ❌ |
Timings | ✔️ | ✔️ | ❌ | ❌ | ❌ | ❌ |
Errors with metadata | ✔️ | ❌ | ❌ | ✔️ | ✔️ | ❌ |
JSON mode | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |
Custom defaults | ✔️ | ✔️ | ❌ | ✔️ | ✔️ | ❌ |
Composable | ✔️ | ❌ | ❌ | ❌ | ❌ | ✔️ |
Hooks | ✔️ | ❌ | ❌ | ✔️ | ✔️ | ❌ |
Issues open | ||||||
Issues closed | ||||||
Downloads | ||||||
Coverage | TBD | |||||
Build | ||||||
Bugs | ||||||
Dependents | ||||||
Install size | ||||||
GitHub stars | ||||||
TypeScript support | ||||||
Last commit |
* It's almost API compatible with the browser fetch
API.
** Need to switch the protocol manually. Doesn't accept PUSH streams and doesn't reuse HTTP/2 sessions.
*** Currently, only DownloadProgress
event is supported, UploadProgress
event is not supported.
¹ Requires Node.js 15.10.0 or above.
❇️ Almost-stable feature, but the API may change. Don't hesitate to try it out!
❔ Feature in early stage of development. Very experimental.