sindresorhus/
Tiny and elegant HTTP client based on the browser Fetch API
USD raised
Recent activities
More comprehensive `retry` option
Fix Travis
Implement & document a way to disable timeouts
Sending form-data
Set the `accept` header when shortcut methods are called
Why I keep getting HTTPError when the throwHttpErrors is already set to `false`
[help] trying to understand why headers are not set properly
FormData & Files Encoding
Compatibility issue with Cloudflare Worker
In Next.js app: Only absolute URLs are supported
Content-Type detection
response.clone(...).arrayBuffer is not a function
await ky.get('url').json() or .text() is an empty string sometimes
Cannot find module 'undici-types' or its corresponding type declarations
[BUG] When Response is a string(not valid JSON), `json` method occurs error
How to handle HTTP Delete Method (204) with ky?
Types for headers
Cannot use import statement outside a module, Jest
How to abort retry before hitting the retry limit?
Support for SSL client certificate in Nodejs undici
TypeError: signal.throwIfAborted is not a function
Support per-request timeouts that trigger retries
Tests are hanging
Passing { next: { revalidate, tags } } options to ky does not work in NextJS edge (at least with dev server)
1.1.1 breaks multipart form boundary
Introduction of Object.hasOwn in Release 1.6.0
New request in afterResponse hook with formData content
`ky(âŚ).text()` returns stringified response object
headers prop missing
Error in Safari: TypeError: Object.hasOwn is not a function
Using FormData With Ky Causes Script to Never Terminate
Aggregated error on server side.
Consider extracting the HTTPError logic to an external module
Use `X-RateLimit-Reset` header to determine retry delay
retry and beforeRetry not triggered
Expected a Promise rejection for option errors
How to download files from external host
Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'headers')
Set TimeoutError#cause to be Request or URL
Integration with cookiejar
[TypeError: signal.throwIfAborted is not a function (it is undefined)] in React Native context
Allow extend() to append to prefixUrl
HTTPError json as unknown/type
retry not working?
Error: unsupported BodyInit type
how to send binary data?
beforeError hook isn't called on 500 responses
Lost headers from options if doing a post with json body => leads to unexpected 401 Unauthorized.
Version 0.32.2 broke Ky in react native
Does ky support RequestCache?
Pass `isRetry` to `beforeRequest` hooks
TypeError: The "emitter" argument must be an instance of EventEmitter or EventTarget. Received an instance of AbortSignal
Want to stop or fetch/get token values inside hooks
Setting searchParams to URLSearchParams both in create() and get() doesn't merge them correctly
Ky vs Got (in 2023)
What is an example of using jest.mock("ky") with mockResolvedValue?
Error in Next.js 13 Server APIs: Cannot construct a Request with a Request object that has already been used
Error 1101 on `esm.sh`
Custom retry delay?
Uncaught (in promise) TypeError: Response.json: Body has already been consumed.
Add onUploadProgress callback function?
Using "Retry-After" with error code 425 is impossible
How to send raw text body in POST request
`browser` file is emitted on Webpack and Babel umd library build
`DOMException` returned from `composeAbortError` does not have name AbortError
TypeError: Cannot set property duplex of #<Request> which has only a getter
In v0.32.0, `.json()` returns an empty string if "Transfer-Encoding: chunked" header is present (and thus "Content-Length: [...]" header is absent)
TypeError: globalThis.Request is not a constructor
Not compatibility with Cloudflare Workers
POST request fails in Astro.js API route
is there a way to prevent HttpError when response is not in range
Ky does not pass custom options down to the native fetch
Error: `unsupported BodyInit type` on some runtimes
retry is wrongly counting
"fetch() request with GET/HEAD/OPTIONS method cannot have body" in Bun
How can I use a proxy like in axios?
Unable to extend NormalizedOptions + Options
ky in the vite environment request hint cors.
Header not set on node version 18.18.2
Full compatibility with Bun
Error: Package subpath 'undefined' is not defined by "exports" in node_modules/ky/package.json
Content-length header is sent to the server with empty value in Next.js 13 route handler.
Always get error TypeError: Failed to fetch
Possible to get retryCount from afterResponse() or beforeError() hooks
Can't set user agent header
Support retry delay with jitter?
Options are overwritten if json option is used
Loader problem
`signal` property isn't merged properly
Convert KyResponse to an interface for better extensibility
Limit throwHttpErrors to list of status codes
Simplify forcing a retry in `afterResponse` hook?
Support SSE reader
ky.create is not a function
Extend retry options with custom retry headers
Export KyInstance as a fetch ponyfill
Cannot seem to pass next cache options as options parametres
Missing exports in npm package distribution`isKyError`,`isHTTPError`,`isTimeoutError`
Issue related to deprecated package "inflight"
How to set a custom type for context in v1.13?
Ky cannot carry request payload in Firefox
feat: type guard for ky errors
ky hangs indefinitely with mode: 'no-cors' and a request body in Next.js
Next JS: error on 401 basically non 200+ status code. But works in fetch
`onUploadProgress` tracks to-be-uploaded size
onUploadProgress error Content Security Policy of your site blocks the use of 'eval' in JavaScript`
Use onUploadProgress Will lose the Content Length header, The server will return 411
NormalizedOptions in afterResponse hook has hooks
Ky doesnt seem to work with next.js caching
feature request: option to prevent trailing slashes
Bug: empty `context` object is added to the request body
TypeError when returning Request in beforeRetry
Ky.ts:231 Uncaught (in promise) Error: `input` must not begin with a slash when using `prefixUrl`
feature: Export non-http-error-throwing ky instance
Normalization of url cause an ssrf security bypass
react-native support
retry.methods is not typed
Ky throws errors on relative URLs in Node environment before any hooks
ky.retry is pending when response body isn't read
uploadProgress not compatible with formData upload
[Docs] Proposal: Korean translation of the documentation
Either/Result Pattern Implementation Plan for Ky v2
benchmark vs other options
memory leak
How to actually see errors in Ky?
There appears to be a broken/non-functioning test
why is lockfile disabled?
Body already used when using afterResponse hook
bug in safari Unhandled Promise Rejection: ReadableStream is not supported
CDN version
Automatically detect the content type retrieved by `fetch()`
Add a `context` option for passing arbitrary data to hooks
Seeking clarification on pronunciation of this library's name
Comparison with `got-scraping`
Normalized options mark method as required, but it can be undefined
Add the ability to add and remove hooks on existing instance
Error not being logged in beforeRetry hook
TypeError: Cannot set property duplex of #<Request> which has only a gettr with newest chrome version
If request starts after the signal has already been aborted, it won't throw an error
Fix signal.throwIfAborted is not a function (it is undefined) on React Native using Expo, Hermes
Remove cookie upon token validation in beforeError hook
Support for option default interface.
Add the timeout type option
Implement oAuth 1.0 in ky
Chrome latest version ky version 0.31.0 is getting this error TypeError: Cannot set property duplex of #<Request> which has only a getter
KyResponse, KyRequest to interface, not type.
Orphan ReadableStream remaining after retry
A ReadableStream branch was created but never consumed
No way to set timeout for .text() / .json()?
Next.js Build Fails with 400 Bad Request After 202 Pages When Using ky, Works with fetch
Using â onUploadProgressâ attributes resulted in not using vite proxy
Example with searchParams in README is wrong
Unable to use .json() without awaiting response first
TypeError: Options No client type, actually available
TypeError: Object.hasOwn() is not a function
Logging error to the console after signal is aborted
Shortcut for response.bytes()
beforeRequest options type `NormalizedOptions` has no property json
POST requests hanging using Node 20 and Ky 1.8.1
Support older browsers by polyfilling `Object.hasOwn`
Modifying FormData body in beforeRequest hook does not work
Option to return non Response object from `ky` via `afterResponse`
How to attach additional data when using hooks
Upload progress is super fast, but it's fake.
Add a `shouldRetry` option
Ky 1.8.0 hang
Errors in Safari < 17.4 due to using AbortSignal.any
Dispatcher is ignored when specified in `ky.create`
503 error when converting `body` string into a `bodyParams` object
Document `ProxyAgent` and HTTP/2 support
searchParams without base url break
throwHttpErrors: false suppresses ky.TimeoutError
Cannot read property 'clone' of undefined
NormalizedOptions interface giving wrong Headers type
Write a test for request cancellation on timeout
HTTPError type is not exported
TypeError invalid URL when using relative URL and searchParams
Retries for POST still broken
Duplicate retries when using Chromium
Support for static / custom backoff types
retry not working with POST (with OPTIONS preflight) and 401 statuscode
Compatibility with fetch-mock
Uniformize Error Types
Disable retry
TypeScript issue with React Native + /// <reference lib="dom"/>
falsey values in `json` prop are not sent to server
Request not cancelled when timeout occurs
Issue with 1 ms delay before awaiting fetch
Add default headers without re exporting it everywhere
Issue with Retries after v0.16.0
ky in typescript don't work
ReferenceError: 'URLSearchParams' is not defined
Edge <= 18 Invalid argument exception
SyntaxError: Unexpected token 'export'
ky does not work with create-react-app
How to do retries after timeouts?
How to skip SSL certificate checking?
parseJson() is not called in AfterResponseHook
Can external "fetch dependency be injected to ky"
Include request URL in TimeoutError message
Question regarding Q&A
`error.response.clone()` trigger error
Compatibility with chrome 53
update hooks signatures in readme
not get corrrect html
Creating a client with headers throws an exception if isomorphic-fetch was required before
Ky create not working with typescript
Add an ES5 build for older browsers
Support custom JSON parser
Unhandled Rejection (Error): `input` must not begin with a slash when using `prefixUrl`
Why does ky throw errors on 3xx responses?
TypeError o.response is undefined
An undefined HTTPError message breaks New Relic
Skipping request by returning a Response in beforeRequest
Validate input
afterResponse hook causes response Promise to hang
regeneratorRuntime is not defined
Ky typescript, jest and es modules + temp solution
Document how to override headers in beforeRequest hook
`afterResponse` hook doesn't work with the new expanded `retry` option
Modify the request URL in the `beforeRequest` hook
TypeScript - Union `Options` complicates `ky` API
Passing a Request object as first argument to ky fails
How to set Response headers?
Using with http-proxy-middleware
[feature request] support array of query string parameters in get request
delay causes node process to hang
Adding header in beforeRequest downcases it on android
Promise never/rarely resolves
Should be `prefixUrl` prepended if `input` is a URL instance?
Does not work when mocking `window.fetch`
çŤăŽéĄçŞăŽĺ˘ăç ăăŚéٞă sounds so strange as the description of this library
Set headers after ky declared
Support access input, options in hooks
Don't throw on `204 No Content` when parsing response
Typing beforeRequestHook arguments - no exported member 'NormalizedOptions'?
Multipart boundary mismatch when using search params
Header set in beforeRequest hook not overridden by request options
Move named exports to properties of default export
Error: The `content-type` header cannot be used with a FormData body. It will be set automatically.
Regression in global property lookup
Can't override Request 'Accept' header
Document `prefixUrl` reasonings
TypeScript error when using afterResponse hook example from documentation
beforeRetry hook should expose failed response
[vite] dependency ky does not have default entry defined in package.json.
how to parse error response?
Remove headers
`document` is not available in WebWorkers on Safari which leads to TypeError
Using umd.js with traditional <script> tag causes ReferenceError: can't access lexical declaration ky before initialization
Support retries on certain network failures
add 'beforeRequest' example in docs
Add upload progress callback
Support boolean options in `searchParams`?
Port tests from Got
this package can't run in react-native
Recent versions of ky are not published to deno.land/x
Allow extend() to add hooks
HTTP2 (h2) support
Headers are not sent when mode is no-cors
1.0.0 release?
Retry option is invalid for back-end server
prefixURL not working correctly when used as environmental variable
Stucked on GET error
Missing "sourcesContent" in source map
Response details are lost when using onDownloadProgress
`beforeError` hook
Several retry problems
Customize retry backoff algorithm
"Require Cycle" warn while using "ky" with "react-native"
Allow providing custom global methods
Sending form data fails on Deno 1.13.2
multiple response headers with the same name are being clobbered
Example for Typescript
Accept empty responses on `json` response type
How to send FormData with application/json?
Use original request for fetch and store cloned request for retries
0.31.2 - `ReadableStream` is missing on firefox
0.32.2 breaking on Cloudflare Workers
Ky 0.31.2 fails on NodeJS 18.7.0
Chrome@105 Failed to construct Request The duplex member must be specified
Download file from s3 url
source contains non-free font Optima
Documentation for beforeError has incorrect usage of response.body
Empty 204 response throw error - 0.31.0
ky overwrites `content-length` to 0 although set in the post request header
referrerPolicy is unset if json is used
ky.get().json() throws, while ky.get().then(r => r.json()) does not in jest tests
Ky does not seem to handle large JSON responses well
Json return empty string if server responds with a 202 status code
_ky.default.get(...).json is not a function Jest
can pass options argument when invoke options.fetch?
Automatically send CSRF token from CSRF cookie on a header
Using this library in a cordova app is causing setTimeout to not invoke its callbacks
Built-in APIs
Parse empty response bodies without throwing
Got a typescript issue with ky
TypeScript: the type for `ky.TimeoutError` does not expose `request`
merging searchParams by ky.create() occurs unnecessary headers query string
globalThis polyfill required?
NextJs 10 / ky 0.26.x can't compile esm
Any plan/interest to rewrite in TypeScript?
Reconsider dropping named exports
[Feature request] Typing JSON response using TS generics
Improve project discovery
Discussions
ReferenceError: Property 'Reflect' doesn't exist on ReactNative Android
Deno and TypeScript "Property 'get' does not exist on type"
How to set headers in post request?
Allow beforeRetry hooks to replace the request or response
Ky's types don't work in Deno's Typescript
[Feature Request] Support undefined or null value in `searchParams`?
Broken ky.stop
Stand-alone type definitions for NormalizedOptions
BeforeRetryHook type definitions
Include request object in HTTPError
Hook libraries
add "main", "module" and "types" field
Options type is not exported anymore
Question getting retry to work
Allow custom content-type header to be set
The `credentials` field on `RequestInitializerDict` is not implemented; Cloudflare Workers issue.
[DEP0151] DeprecationWarning under Node.js 16
why node >= 12?
[question] generating ky code from openapi specs
package.json file missing from exports
beforeRequestFn processing changed after 0.28.2 > 0.28.3 upgrade
Can't Override Prefix URL in beforeRequest hook
Recent Ky Update No Longer Works With Next.js
Comparison table
1ms delay before fetch causing issues with New Relic SPA logger
Discrepancy between doc and types for searchparams options in v 0.28
Using `json` field hangs with high CPU (with Deno)
Module not found: Can't resolve 'ky' with version 0.28
POST request doesn't have body for Tizen 2017
Fix TypeScript ignore directives
Import error when using next.js
Cannot set timeout
Warning on react-native: "Package ky has been ignored because it contains invalid configuration"
Š 2019 BoostIO, Inc.