---
url: https://haihv.github.io/valifetch/api/index/type-aliases/Hooks.md
---

# Type Alias: Hooks

> **Hooks** = `object`

Defined in: [src/types/hooks.ts:68](https://github.com/haihv/valifetch/blob/285835d38a6676b98d2ee1a93e23166c6c834cb2/src/types/hooks.ts#L68)

All available hooks

## Properties

### afterParseResponse?

> `optional` **afterParseResponse?**: [`AfterParseResponseHook`](AfterParseResponseHook.md)\[]

Defined in: [src/types/hooks.ts:74](https://github.com/haihv/valifetch/blob/285835d38a6676b98d2ee1a93e23166c6c834cb2/src/types/hooks.ts#L74)

Hooks called after the response body has been parsed

***

### afterResponse?

> `optional` **afterResponse?**: [`AfterResponseHook`](AfterResponseHook.md)\[]

Defined in: [src/types/hooks.ts:72](https://github.com/haihv/valifetch/blob/285835d38a6676b98d2ee1a93e23166c6c834cb2/src/types/hooks.ts#L72)

Hooks called after each response is received, before parsing

***

### beforeError?

> `optional` **beforeError?**: [`BeforeErrorHook`](BeforeErrorHook.md)\[]

Defined in: [src/types/hooks.ts:78](https://github.com/haihv/valifetch/blob/285835d38a6676b98d2ee1a93e23166c6c834cb2/src/types/hooks.ts#L78)

Hooks called before a ValifetchError is thrown to the caller

***

### beforeRequest?

> `optional` **beforeRequest?**: [`BeforeRequestHook`](BeforeRequestHook.md)\[]

Defined in: [src/types/hooks.ts:70](https://github.com/haihv/valifetch/blob/285835d38a6676b98d2ee1a93e23166c6c834cb2/src/types/hooks.ts#L70)

Hooks called before each request is sent

***

### beforeRetry?

> `optional` **beforeRetry?**: [`BeforeRetryHook`](BeforeRetryHook.md)\[]

Defined in: [src/types/hooks.ts:76](https://github.com/haihv/valifetch/blob/285835d38a6676b98d2ee1a93e23166c6c834cb2/src/types/hooks.ts#L76)

Hooks called before each retry attempt is scheduled
