{"full_name":"sindresorhus/ky","owner":"sindresorhus","name":"ky","shard":"1","url":"https://github.com/sindresorhus/ky","description":"🌳 Tiny & elegant JavaScript HTTP client based on the Fetch API","homepage":"","topics":["fetch","whatwg-fetch","http-client","http-request","request","npm-package","tiny","json","rest","js","javascript"],"tag_pages":["fetch","http-client","javascript","js","json","npm-package","request","rest"],"language":"TypeScript","license":"MIT","avatar":"https://avatars.githubusercontent.com/u/170270?u=34acd557a042ac478d273a4621570cadb6b0bd89&v=4","created_at":"2018-09-04T16:26:42Z","pushed_at":"2026-10-09T06:29:49Z","metrics":{"stars":17161,"forks":547,"watchers":59,"issues":454,"prs":336,"releases":98,"issues_open":0,"issues_closed":454,"prs_open":0,"prs_closed":82,"prs_merged":254,"discussions":70},"growth":{"day":{"stars":-2,"forks":33,"base_day":"2026-11-15"},"week":{"stars":15,"forks":36,"base_day":"2026-11-04"},"month":{"stars":40,"forks":44,"base_day":"2026-10-17"}},"history":{"dates":["2026-09-06","2026-09-07","2026-09-08","2026-09-09","2026-09-10","2026-09-11","2026-09-12","2026-09-13","2026-09-14","2026-09-15","2026-09-16","2026-09-17","2026-09-18","2026-09-19","2026-09-20","2026-09-21","2026-09-22","2026-09-23","2026-09-24","2026-09-25","2026-09-26","2026-09-27","2026-09-28","2026-09-29","2026-09-30","2026-10-01","2026-10-02","2026-10-03","2026-10-04","2026-10-05","2026-10-06","2026-10-07","2026-10-08","2026-10-09","2026-10-10","2026-10-11","2026-10-12","2026-10-13","2026-10-14","2026-10-15","2026-10-16","2026-10-17","2026-10-18","2026-10-19","2026-10-20","2026-10-21","2026-10-22","2026-10-23","2026-10-24","2026-10-25","2026-10-26","2026-10-27","2026-10-28","2026-10-29","2026-10-30","2026-10-31","2026-11-01","2026-11-02","2026-11-03","2026-11-04","2026-11-10","2026-11-11","2026-11-12","2026-11-13","2026-11-14","2026-11-15","2026-11-16"],"stars":[17054,17056,17058,17060,17064,17066,17067,17068,17070,17072,17071,17069,17072,17072,17075,17076,17080,17084,17086,17090,17091,17092,17094,17096,17098,17099,17099,17104,17105,17106,17104,17107,17106,17106,17106,17106,17107,17111,17113,17117,17120,17121,17124,17125,17127,17128,17129,17130,17131,17135,17139,17138,17141,17141,17142,17142,17142,17142,17144,17146,17149,17163,17171,17174,17163,17163,17161],"forks":[495,494,494,494,494,494,494,494,494,494,494,494,494,494,495,495,495,496,496,496,496,497,498,498,498,499,499,499,499,499,499,499,499,500,501,503,503,503,503,503,503,503,503,503,503,503,504,504,504,504,504,505,506,507,507,507,509,509,510,511,512,514,515,515,514,514,547],"watchers":[63,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,59,59,59,59,59,59,60,60,60,60,60,null,59,59,59,59,59,59],"issues_open":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,0,0,0,0,0,0],"prs_open":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,0,0,0,0,0,0]},"boards":{"daily_forks":148},"same_owner":[{"full_name":"sindresorhus/awesome","name":"awesome","shard":"1","boards":{"daily":40,"weekly":42,"monthly":21,"daily_rate":177,"daily_forks":156,"total":2}},{"full_name":"sindresorhus/awesome-nodejs","name":"awesome-nodejs","shard":"1","boards":{}},{"full_name":"sindresorhus/github-markdown-css","name":"github-markdown-css","shard":"1","boards":{}},{"full_name":"sindresorhus/ora","name":"ora","shard":"1","boards":{}},{"full_name":"sindresorhus/pageres","name":"pageres","shard":"1","boards":{}},{"full_name":"sindresorhus/quick-look-plugins","name":"quick-look-plugins","shard":"1","boards":{}},{"full_name":"sindresorhus/type-fest","name":"type-fest","shard":"1","boards":{}}],"issues":[],"discussions":[{"number":884,"title":"Limit response size to prevent OOM issues","comments":1,"category":"Ideas","created_at":"2026-09-11T15:17:51Z"},{"number":872,"title":"Add new type of request (QUERY)","comments":2,"category":"Ideas","created_at":"2026-07-05T05:47:31Z"},{"number":865,"title":"Performance improvements with TC39 proposals JSON.parseBinary and ArrayBuffer.prototype.detach","comments":2,"category":"Ideas","created_at":"2026-05-06T09:01:23Z"},{"number":860,"title":"What is the best way to handle TypeScript typing for proxy settings in Bun?","comments":2,"category":"Q&A","created_at":"2026-04-15T11:21:55Z"},{"number":795,"title":"How to actually see errors in Ky?","comments":1,"category":"General","created_at":"2025-11-26T08:24:06Z"},{"number":788,"title":"How to set a custom type for context in v1.13?","comments":1,"category":"Q&A","created_at":"2025-10-31T12:19:08Z"},{"number":776,"title":"retry based on response content","comments":2,"category":"Q&A","created_at":"2025-10-23T08:58:46Z"},{"number":766,"title":"Will the request headers be overwritten?","comments":1,"category":"Q&A","created_at":"2025-10-15T11:38:14Z"}],"latest_release":{"name":"","tag":"v2.2.0","published_at":"2026-10-09T06:31:45Z","body":"> [!NOTE]\r\n> In `init` hooks, `options.headers` now has lowercase names. Read and delete headers with lowercase names, for example `delete options.headers.authorization`.\r\n\r\n### Improvements\r\n\r\n- Add [`maxResponseSize`](https://github.com/sindresorhus/ky#maxresponsesize) option  0d59458\r\n\t- Limits the response body size in bytes, counted after decompression. Exceeding it throws the new [`ResponseSizeError`](https://github.com/sindresorhus/ky#responsesizeerror).\r\n- Let [`beforeRetry`](https://github.com/sindresorhus/ky#hooksbeforeretry) hooks change options for the next attempts (#885)  242c327\r\n\t- Return `{options: {...}}` to change `onUploadProgress`, `onDownloadProgress`, `timeout`, `fetch`, or `throwHttpErrors`. For example, retry a failed upload without upload progress.\r\n- Respect `Retry-After` and rate-limit headers when [`retry.shouldRetry`](https://github.com/sindresorhus/ky#retry) returns `true`  d1c921f\r\n- Run `beforeError` hooks for errors thrown while reading the response body  323b98f 50c3810\r\n\t- A connection that drops while `.json()`, `.text()`, etc. reads the body is now a `NetworkError`.\r\n- Support `onUploadProgress` and streamed `Request` bodies in Bun and Deno  83c711c\r\n- Validate options and report clear errors  3ded2aa\r\n\t- Invalid options now throw a `TypeError` that names the option, instead of being silently ignored or failing later with an internal error. This includes `null`, non-array hooks, and invalid `timeout` and `retry` values.\r\n\t- Invalid options and errors thrown by `init` hooks now reject the returned promise instead of throwing synchronously.\r\n- Improve TypeScript types  51b3177 52b8f93 f4886ca 481f6f7\r\n\t- Accept readonly arrays and explicit `undefined` for all options, allow custom error names, and fix the `.clone()` and `.bytes()` return types.\r\n\r\n### Fixes\r\n\r\n- Fix aborts and timeouts in many edge cases  e1b088e 2f0a3fb 7c1272b 82fa84c 3f0e330\r\n\t- User aborts and timeouts now also cancel requests returned from hooks, interrupt pending hooks and body reads, and are no longer reported as `NetworkError` and retried in Chromium. `totalTimeout` is now enforced when the response or body arrives after the deadline.\r\n- Fix `searchParams` with a `Request` input dropping its body and options such as `credentials`  b4bdecc 4e0bf0b\r\n- Fix option merging in `.extend()` and `init` hooks  e06d351 0655b9d c5dc4e6 88e2432\r\n\t- Class instances, such as an undici `Agent` as `dispatcher` or a `Date` in `json`, are no longer turned into plain objects. Header names are now matched case-insensitively. Changes made in `.extend()` callbacks and `init` hooks no longer leak into other requests.\r\n- Fix many `replaceOption()` edge cases  cc9b5a3 d6e049a deb5a33\r\n- Fix `parseJson` being ignored by `response.clone().json()` and when using `onDownloadProgress`  c6c5dbf 015ef95\r\n- Fix progress events, including wrong `totalBytes` for compressed responses and missing response properties with `onDownloadProgress`  d89c8c8 e893f16 de278ae\r\n- Fix `onUploadProgress` breaking uploads without request stream support, and `keepalive` and `no-cors` requests  6520f64 06ebf18\r\n- Fix `fetch: window.fetch` throwing \"Illegal invocation\" in browsers  92ef60e\r\n- Fix `isTimeoutError()` and the other type guards matching unrelated errors with the same `name`  d636438\r\n- Fix `request` on Ky errors being an internal clone instead of the request that was sent  619c427 ec3d17f\r\n\r\n---\r\n\r\nhttps://github.com/sindresorhus/ky/compare/v2.1.0...v2.2.0","is_prerelease":false},"readme":false,"readme_zh":false,"news":[],"stale":false,"snapshot_at":"2026-11-16T09:23:14Z","history_start":"2026-09-06"}