<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/ky-2-0-fetch-api-wrapper-with-revamped-hooks-smarter-timeouts-and-built-in-schema-validation-vactnrk6o" -->

---
title: Ky 2.0 Fetch API Wrapper with Revamped Hooks, Smarter...
description: Ky 2.0, the lightweight JavaScript HTTP client built on the Fetch API by Sindre Sorhus, has shipped its first major release in years. Key changes include...
canonical: https://daily.dev/posts/ky-2-0-fetch-api-wrapper-with-revamped-hooks-smarter-timeouts-and-built-in-schema-validation-vactnrk6o
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Ky 2.0 Fetch API Wrapper with Revamped Hooks, Smarter Timeouts, and Built-In Schema Validation | daily.dev
og:description: Ky 2.0, the lightweight JavaScript HTTP client built on the Fetch API by Sindre Sorhus, has shipped its first major release in years. Key changes include...
og:url: https://daily.dev/posts/ky-2-0-fetch-api-wrapper-with-revamped-hooks-smarter-timeouts-and-built-in-schema-validation-vactnrk6o
og:image: https://api.daily.dev/og/posts/VacTnRK6o.png
og:image:alt: Ky 2.0 Fetch API Wrapper with Revamped Hooks, Smarter Timeouts, and Built-In Schema Validation
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Ky 2.0 Fetch API Wrapper with Revamped Hooks, Smarter Timeouts, and Built-In Schema Validation

**[InfoQ](https://daily.dev/sources/infoq)** · 3 min read · 0 upvotes · 0 comments

## Summary

Ky 2.0, the lightweight JavaScript HTTP client built on the Fetch API by Sindre Sorhus, has shipped its first major release in years. Key changes include unified hook handling where all hooks now receive a single state object, a new totalTimeout option that caps the entire operation across retries, cleaner URL handling with a renamed prefix option and a new baseUrl option following standard URL resolution, and built-in response validation via Standard Schema supporting Zod, Valibot, and compatible validators. HTTPError now exposes a pre-parsed data property to avoid resource leaks. The release requires Node.js 22 and includes a full migration guide with before-and-after examples for breaking changes.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.infoq.com/news/2026/06/ky-2-revamp-axios>

## Similar posts on daily.dev

- [How to Go from Toy API Calls to Production-Ready Networking in JavaScript](https://daily.dev/posts/how-to-go-from-toy-api-calls-to-production-ready-networking-in-javascript-urjuzdobr) · freeCodeCamp · 2 upvotes · 0 comments

---

Tags: [#webdev](https://daily.dev/tags/webdev), [#typescript](https://daily.dev/tags/typescript)

[View this post on daily.dev](https://daily.dev/posts/ky-2-0-fetch-api-wrapper-with-revamped-hooks-smarter-timeouts-and-built-in-schema-validation-vactnrk6o)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Ky 2.0 Fetch API Wrapper with Revamped Hooks, Smarter Timeouts, and Built-In Schema Validation","url":"https://daily.dev/posts/ky-2-0-fetch-api-wrapper-with-revamped-hooks-smarter-timeouts-and-built-in-schema-validation-vactnrk6o","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/ky-2-0-fetch-api-wrapper-with-revamped-hooks-smarter-timeouts-and-built-in-schema-validation-vactnrk6o"},"datePublished":"2026-06-18T11:45:28.864Z","dateModified":"2026-08-24T06:57:42.923Z","description":"Ky 2.0, the lightweight JavaScript HTTP client built on the Fetch API by Sindre Sorhus, has shipped its first major release in years. Key changes include...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/58f7f0dce551c1e953f152b1bd39e18c?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/58f7f0dce551c1e953f152b1bd39e18c?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"InfoQ","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"InfoQ","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/afc3bced3e1e4b188dd9127017a60e0c","url":"https://daily.dev/sources/infoq"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/ky-2-0-fetch-api-wrapper-with-revamped-hooks-smarter-timeouts-and-built-in-schema-validation-vactnrk6o","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"webdev,typescript","timeRequired":"PT3M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"InfoQ","item":"https://daily.dev/sources/infoq"},{"@type":"ListItem","position":3,"name":"Ky 2.0 Fetch API Wrapper with Revamped Hooks, Smarter Timeouts, and Built-In Schema Validation"}]}
```

