该 skill 基于 Ky v1.14.3,生成于 2026-02-04。
Ky is a tiny and elegant HTTP client based on the Fetch API. It provides a simpler and more powerful API than plain fetch with no dependencies, targeting modern browsers, Node.js 18+, Bun, and Deno.
Core References
| Topic |
Description |
Reference |
| Basic Usage |
HTTP method shortcuts, response body methods, TypeScript support |
core-usage |
| Core Options |
json, searchParams, prefixUrl, timeout, method |
core-options |
Features
Retry Mechanism
| Topic |
Description |
Reference |
| Automatic Retry |
Configurable retry strategies, delays, jitter, custom logic |
feature-retry |
Hooks System
| Topic |
Description |
Reference |
| Lifecycle Hooks |
beforeRequest, beforeRetry, afterResponse, beforeError hooks |
feature-hooks |
Instance Management
| Topic |
Description |
Reference |
| Custom Instances |
ky.create(), ky.extend(), context for hooks |
feature-instances |
Error Handling
| Topic |
Description |
Reference |
| Error Types |
HTTPError, TimeoutError, ForceRetryError, type guards |
feature-errors |
Advanced
Best Practices