Comparing version 1.2.3 to 1.2.4
@@ -16,3 +16,3 @@ import { type stop } from '../core/constants.js'; | ||
/** | ||
This hook enables you to modify the request right before it is sent. Ky will make no further changes to the request after this. The hook function receives normalized input and options as arguments. You could, forf example, modiy `options.headers` here. | ||
This hook enables you to modify the request right before it is sent. Ky will make no further changes to the request after this. The hook function receives normalized input and options as arguments. You could, for example, modify `options.headers` here. | ||
@@ -19,0 +19,0 @@ A [`Response`](https://developer.mozilla.org/en-US/docs/Web/API/Response) can be returned from this hook to completely avoid making a HTTP request. This can be used to mock a request, check an internal cache, etc. An **important** consideration when returning a `Response` from this hook is that all the following hooks will be skipped, so **ensure you only return a `Response` from the last hook**. |
@@ -0,13 +1,20 @@ | ||
/// <reference types="node" resolution-mode="require"/> | ||
type UndiciHeadersInit = string[][] | Record<string, string | readonly string[]> | Headers; | ||
type UndiciBodyInit = ArrayBuffer | AsyncIterable<Uint8Array> | Blob | FormData | Iterable<Uint8Array> | NodeJS.ArrayBufferView | URLSearchParams | null | string; | ||
type UndiciRequestRedirect = 'error' | 'follow' | 'manual'; | ||
type UndiciRequestCredentials = 'omit' | 'include' | 'same-origin'; | ||
type UndiciReferrerPolicy = '' | 'no-referrer' | 'no-referrer-when-downgrade' | 'origin' | 'origin-when-cross-origin' | 'same-origin' | 'strict-origin' | 'strict-origin-when-cross-origin' | 'unsafe-url'; | ||
type UndiciRequestMode = 'cors' | 'navigate' | 'no-cors' | 'same-origin'; | ||
type UndiciRequestInit = { | ||
method?: string; | ||
keepalive?: boolean; | ||
headers?: HeadersInit; | ||
body?: BodyInit; | ||
redirect?: RequestRedirect; | ||
headers?: UndiciHeadersInit; | ||
body?: UndiciBodyInit; | ||
redirect?: UndiciRequestRedirect; | ||
integrity?: string; | ||
signal?: AbortSignal | undefined; | ||
credentials?: RequestCredentials; | ||
mode?: RequestMode; | ||
credentials?: UndiciRequestCredentials; | ||
mode?: UndiciRequestMode; | ||
referrer?: string; | ||
referrerPolicy?: ReferrerPolicy; | ||
referrerPolicy?: UndiciReferrerPolicy; | ||
window?: undefined; | ||
@@ -14,0 +21,0 @@ dispatcher?: unknown; |
@@ -0,2 +1,8 @@ | ||
/* | ||
Undici types need to be here because they are not exported to globals by @types/node. | ||
See https://github.com/DefinitelyTyped/DefinitelyTyped/discussions/69408 | ||
After the types are exported to globals, the Undici types can be removed from here. | ||
*/ | ||
export {}; | ||
//# sourceMappingURL=request.js.map |
{ | ||
"name": "ky", | ||
"version": "1.2.3", | ||
"version": "1.2.4", | ||
"description": "Tiny and elegant HTTP client based on the browser Fetch API", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -27,2 +27,18 @@ <div align="center"> | ||
</a> | ||
<br> | ||
<br> | ||
<br> | ||
<a href="https://logto.io/?ref=sindre"> | ||
<div> | ||
<picture> | ||
<source width="200" media="(prefers-color-scheme: dark)" srcset="https://sindresorhus.com/assets/thanks/logto-logo-dark.svg?x"> | ||
<source width="200" media="(prefers-color-scheme: light)" srcset="https://sindresorhus.com/assets/thanks/logto-logo-light.svg?x"> | ||
<img width="200" src="https://sindresorhus.com/assets/thanks/logto-logo-light.svg?x" alt="Logto logo"> | ||
</picture> | ||
</div> | ||
<b>The better identity infrastructure for developers</b> | ||
<div> | ||
<sup>Logto is an open-source Auth0 alternative designed for every app.</sup> | ||
</div> | ||
</a> | ||
</p> | ||
@@ -137,3 +153,3 @@ <br> | ||
When using a `Request` instance as `input`, any URL altering options (such as `prefixUrl`) will be ignored. | ||
When using a [`Request`](https://developer.mozilla.org/en-US/docs/Web/API/Request) instance as `input`, any URL altering options (such as `prefixUrl`) will be ignored. | ||
@@ -140,0 +156,0 @@ #### options |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
147438
1148
701