Skip to content

Commit

Permalink
docs: update customFetch and useMtlsAlias a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
panva committed Feb 3, 2024
1 parent bc508f6 commit 627e716
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
9 changes: 5 additions & 4 deletions docs/variables/customFetch.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,13 @@ Known caveats:

- Expect Type-related issues when passing the inputs through to fetch-like modules, they hardly
ever get their typings inline with actual fetch, you should `@ts-expect-error` them.
- Returning self-constructed Response instances prohibits AS-signalled DPoP Nonce caching.
- Returning self-constructed Response instances prohibits AS/RS-signalled DPoP Nonce
caching.

**`Example`**

Using [sindresorhus/ky](https://github.com/sindresorhus/ky) hooks feature for logging outgoing
requests and their responses.
Using [sindresorhus/ky](https://github.com/sindresorhus/ky) for retries and its hooks feature for
logging outgoing requests and their responses.

```js
import ky from 'ky'
Expand Down Expand Up @@ -66,7 +67,7 @@ await oauth.discoveryRequest(new URL('https://as.example.com'), {

**`Example`**

Using [nodejs/undici](https://github.com/nodejs/undici) for mocking.
Using [nodejs/undici](https://github.com/nodejs/undici) to mock responses in tests.

```js
import * as undici from 'undici'
Expand Down
9 changes: 5 additions & 4 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -221,12 +221,13 @@ export const clockTolerance = Symbol()
*
* - Expect Type-related issues when passing the inputs through to fetch-like modules, they hardly
* ever get their typings inline with actual fetch, you should `@ts-expect-error` them.
* - Returning self-constructed {@link Response} instances prohibits AS-signalled DPoP Nonce caching.
* - Returning self-constructed {@link Response} instances prohibits AS/RS-signalled DPoP Nonce
* caching.
*
* @example
*
* Using [sindresorhus/ky](https://github.com/sindresorhus/ky) hooks feature for logging outgoing
* requests and their responses.
* Using [sindresorhus/ky](https://github.com/sindresorhus/ky) for retries and its hooks feature for
* logging outgoing requests and their responses.
*
* ```js
* import ky from 'ky'
Expand Down Expand Up @@ -260,7 +261,7 @@ export const clockTolerance = Symbol()
*
* @example
*
* Using [nodejs/undici](https://github.com/nodejs/undici) for mocking.
* Using [nodejs/undici](https://github.com/nodejs/undici) to mock responses in tests.
*
* ```js
* import * as undici from 'undici'
Expand Down

0 comments on commit 627e716

Please sign in to comment.