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
Types for headers
Unable to extend NormalizedOptions + Options
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
[help] trying to understand why headers are not set properly
Header not set on node version 18.18.2
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?
Set TimeoutError#cause to be Request or URL
Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'headers')
source contains non-free font Optima
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
How to handle HTTP Delete Method (204) with ky?
Why I keep getting HTTPError when the throwHttpErrors is already set to `false`
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
TypeError: Cannot set property duplex of #<Request> which has only a getter
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`
Lost headers from options if doing a post with json body => leads to unexpected 401 Unauthorized.
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
What is an example of using jest.mock("ky") with mockResolvedValue?
In v0.32.0, `.json()` returns an empty string if "Transfer-Encoding: chunked" header is present (and thus "Content-Length: [...]" header is absent)
`ky(âŚ).text()` returns stringified response object
TypeError: globalThis.Request is not a constructor
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
Documentation for beforeError has incorrect usage of response.body
Loader problem
Not compatibility with Cloudflare Workers
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
ky in the vite environment request hint cors.
Custom retry delay?
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)
TypeError: Object.hasOwn() is not a function
`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
uploadProgress not compatible with formData upload
Example with searchParams in README is wrong
Unable to use .json() without awaiting response first
TypeError: Options No client type, actually available
Next JS: error on 401 basically non 200+ status code. But works in fetch
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`
Using â onUploadProgressâ attributes resulted in not using vite proxy
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.
ky.create is not a function
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
How to set a custom type for context in v1.13?
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
Add a `shouldRetry` option
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"
`signal` property isn't merged properly
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
Introduction of Object.hasOwn in Release 1.6.0
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
Modifying FormData body in beforeRequest hook does not work
Support for option default interface.
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
Seeking clarification on pronunciation of this library's name
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
Remove cookie upon token validation in beforeError hook
Automatically detect the content type retrieved by `fetch()`
Add a `context` option for passing arbitrary data to hooks
Improve Error Handling for Better Integration with React Query
New request in afterResponse hook with formData content
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
CDN version
TypeScript issue with React Native + /// <reference lib="dom"/>
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
searchParams without base url break
Uniformize Error Types
Disable retry
NormalizedOptions interface giving wrong Headers type
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
update hooks signatures in readme
Typing beforeRequestHook arguments - no exported member 'NormalizedOptions'?
Ky create not working with typescript
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
Edge <= 18 Invalid argument exception
not get corrrect html
Creating a client with headers throws an exception if isomorphic-fetch was required before
Multipart boundary mismatch when using search params
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
Compatibility with fetch-mock
throwHttpErrors: false suppresses ky.TimeoutError
Cannot read property 'clone' of undefined
Skipping request by returning a Response in beforeRequest
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?
Validate input
[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
how to parse error response?
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
Don't throw on `204 No Content` when parsing response
How to skip SSL certificate checking?
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
Using with http-proxy-middleware
multiple response headers with the same name are being clobbered
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
this package can't run in react-native
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
Retry option is invalid for back-end server
Example for Typescript
Accept empty responses on `json` response type
How to send FormData with application/json?
ky.get().json() throws, while ky.get().then(r => r.json()) does not in jest tests
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?
Using this library in a cordova app is causing setTimeout to not invoke its callbacks
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
Use original request for fetch and store cloned request for retries
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
[question] generating ky code from openapi specs
Built-in APIs
Parse empty response bodies without throwing
Got a typescript issue with ky
`beforeError` hook
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?
Broken ky.stop
[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"
TypeScript: the type for `ky.TimeoutError` does not expose `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`?
Reconsider dropping named exports
Stand-alone type definitions for NormalizedOptions
BeforeRetryHook type definitions
Include request object in HTTPError
Hook libraries
add "main", "module" and "types" field
[vite] dependency ky does not have default entry defined in package.json.
SyntaxError: Unexpected token 'export'
ky does not work with create-react-app
How to do retries after timeouts?
POST request doesn't have body for Tizen 2017
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
Options type is not exported anymore
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
Comparison table
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"
How to set headers in post 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?
Š 2019 BoostIO, Inc.