Skip to content

Commit

Permalink
Fix docs typos (#571)
Browse files Browse the repository at this point in the history
  • Loading branch information
hawkrives committed Apr 4, 2024
1 parent d042b05 commit ec6733c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/types/hooks.ts
Expand Up @@ -25,7 +25,7 @@ export type BeforeErrorHook = (error: HTTPError) => HTTPError | Promise<HTTPErro

export type Hooks = {
/**
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.
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**.
Expand Down

0 comments on commit ec6733c

Please sign in to comment.