Just learned about Ky, an elegant alternative to fetch or Axios


Just learned about Ky, an elegant alternative to fetch or Axios.

https://github.com/sindresorhus/ky

Ky requires VERY little code to make HTTP calls. 👍

Here's a comparison making the same call with Ky vs fetch:

Other Ky benefits:

Method shortcuts (http://ky.post())
Treats non-2xx status codes as errors (after redirects)
Retries failed requests
JSON option
Timeout support
URL prefix option
Instances with custom defaults
Hooks

Quite compelling!

View original on X