

# Client

<div class="api-docs__separator" data-reactroot="">

---

</div><div class="api-docs__import" data-reactroot="">

```ts
import { Client } from "@hyper-fetch/core"
```

</div><div class="api-docs__section">

## Description

</div><div class="api-docs__description"><span class="api-docs__do-not-parse">

**Client** is a class that allows you to configure the connection with the server and then use it to create
requests which, when called using the appropriate method, will cause the server to be queried for the endpoint and
method specified in the request.

</span></div><p class="api-docs__definition">

Defined in [client/client.ts:40](https://github.com/BetterTyped/hyper-fetch/blob/c44d728f/packages/core/src/client/client.ts#L40)

</p><div class="api-docs__section">

## Parameters

</div><div class="api-docs__parameters"><table><thead><tr><th>Name</th><th>Details</th></tr></thead><tbody><tr param-data="options"><td class="api-docs__param-name required">

### options 

`Required`

</td><td class="api-docs__param-type">

`ClientOptionsType<Client<GlobalErrorType, AdapterType>>`

</td></tr></tbody></table></div><div class="api-docs__section">

## Properties

</div><div class="api-docs__properties"><div class="api-docs__property" property-data="adapter"><h3 class="api-docs__name">

### `adapter`

</h3><div class="api-docs__section">

#### Description

</div><div class="api-docs__description"><span class="api-docs__do-not-parse">



</span></div><p class="api-docs__definition">

Defined in [client/client.ts:60](https://github.com/BetterTyped/hyper-fetch/blob/c44d728f/packages/core/src/client/client.ts#L60)

</p><div class="api-docs__section">

#### Type

</div><div class="api-docs__property-type">

```ts
AdapterType
```

</div><hr/></div><div class="api-docs__property" property-data="appManager"><h3 class="api-docs__name">

### `appManager`

</h3><div class="api-docs__section">

#### Description

</div><div class="api-docs__description"><span class="api-docs__do-not-parse">



</span></div><p class="api-docs__definition">

Defined in [client/client.ts:56](https://github.com/BetterTyped/hyper-fetch/blob/c44d728f/packages/core/src/client/client.ts#L56)

</p><div class="api-docs__section">

#### Type

</div><div class="api-docs__property-type">

```ts
AppManager
```

</div><hr/></div><div class="api-docs__property" property-data="cache"><h3 class="api-docs__name">

### `cache`

</h3><div class="api-docs__section">

#### Description

</div><div class="api-docs__description"><span class="api-docs__do-not-parse">



</span></div><p class="api-docs__definition">

Defined in [client/client.ts:61](https://github.com/BetterTyped/hyper-fetch/blob/c44d728f/packages/core/src/client/client.ts#L61)

</p><div class="api-docs__section">

#### Type

</div><div class="api-docs__property-type">

```ts
Cache<Client<GlobalErrorType, AdapterType>>
```

</div><hr/></div><div class="api-docs__property" property-data="debug"><h3 class="api-docs__name">

### `debug`

</h3><div class="api-docs__section">

#### Description

</div><div class="api-docs__description"><span class="api-docs__do-not-parse">



</span></div><p class="api-docs__definition">

Defined in [client/client.ts:45](https://github.com/BetterTyped/hyper-fetch/blob/c44d728f/packages/core/src/client/client.ts#L45)

</p><div class="api-docs__section">

#### Type

</div><div class="api-docs__property-type">

```ts
boolean
```

</div><hr/></div><div class="api-docs__property" property-data="defaultAdditionalData"><h3 class="api-docs__name">

### `defaultAdditionalData`

</h3><div class="api-docs__section">

#### Description

</div><div class="api-docs__description"><span class="api-docs__do-not-parse">



</span></div><p class="api-docs__definition">

Defined in [client/client.ts:66](https://github.com/BetterTyped/hyper-fetch/blob/c44d728f/packages/core/src/client/client.ts#L66)

</p><div class="api-docs__section">

#### Type

</div><div class="api-docs__property-type">

```ts
ExtractAdapterAdditionalDataType<AdapterType>
```

</div><hr/></div><div class="api-docs__property" property-data="defaultMethod"><h3 class="api-docs__name">

### `defaultMethod`

</h3><div class="api-docs__section">

#### Description

</div><div class="api-docs__description"><span class="api-docs__do-not-parse">



</span></div><p class="api-docs__definition">

Defined in [client/client.ts:65](https://github.com/BetterTyped/hyper-fetch/blob/c44d728f/packages/core/src/client/client.ts#L65)

</p><div class="api-docs__section">

#### Type

</div><div class="api-docs__property-type">

```ts
ExtractAdapterMethodType<AdapterType>
```

</div><hr/></div><div class="api-docs__property" property-data="effects"><h3 class="api-docs__name">

### `effects`

</h3><div class="api-docs__section">

#### Description

</div><div class="api-docs__description"><span class="api-docs__do-not-parse">



</span></div><p class="api-docs__definition">

Defined in [client/client.ts:70](https://github.com/BetterTyped/hyper-fetch/blob/c44d728f/packages/core/src/client/client.ts#L70)

</p><div class="api-docs__section">

#### Type

</div><div class="api-docs__property-type">

```ts
RequestEffectInstance[]
```

</div><hr/></div><div class="api-docs__property" property-data="fetchDispatcher"><h3 class="api-docs__name">

### `fetchDispatcher`

</h3><div class="api-docs__section">

#### Description

</div><div class="api-docs__description"><span class="api-docs__do-not-parse">



</span></div><p class="api-docs__definition">

Defined in [client/client.ts:62](https://github.com/BetterTyped/hyper-fetch/blob/c44d728f/packages/core/src/client/client.ts#L62)

</p><div class="api-docs__section">

#### Type

</div><div class="api-docs__property-type">

```ts
Dispatcher
```

</div><hr/></div><div class="api-docs__property" property-data="logger"><h3 class="api-docs__name">

### `logger`

</h3><div class="api-docs__section">

#### Description

</div><div class="api-docs__description"><span class="api-docs__do-not-parse">



</span></div><p class="api-docs__definition">

Defined in [client/client.ts:100](https://github.com/BetterTyped/hyper-fetch/blob/c44d728f/packages/core/src/client/client.ts#L100)

</p><div class="api-docs__section">

#### Type

</div><div class="api-docs__property-type">

```ts
LoggerType
```

</div><hr/></div><div class="api-docs__property" property-data="loggerManager"><h3 class="api-docs__name">

### `loggerManager`

</h3><div class="api-docs__section">

#### Description

</div><div class="api-docs__description"><span class="api-docs__do-not-parse">



</span></div><p class="api-docs__definition">

Defined in [client/client.ts:57](https://github.com/BetterTyped/hyper-fetch/blob/c44d728f/packages/core/src/client/client.ts#L57)

</p><div class="api-docs__section">

#### Type

</div><div class="api-docs__property-type">

```ts
LoggerManager
```

</div><hr/></div><div class="api-docs__property" property-data="options"><h3 class="api-docs__name">

### `options`

</h3><div class="api-docs__section">

#### Description

</div><div class="api-docs__description"><span class="api-docs__do-not-parse">



</span></div><p class="api-docs__definition">

Defined in [client/client.ts:102](https://github.com/BetterTyped/hyper-fetch/blob/c44d728f/packages/core/src/client/client.ts#L102)

</p><div class="api-docs__section">

#### Type

</div><div class="api-docs__property-type">

```ts
ClientOptionsType<Client<GlobalErrorType, AdapterType>>
```

</div><hr/></div><div class="api-docs__property" property-data="queryParamsConfig"><h3 class="api-docs__name">

### `queryParamsConfig`

</h3><div class="api-docs__section">

#### Description

</div><div class="api-docs__description"><span class="api-docs__do-not-parse">



</span></div><p class="api-docs__definition">

Defined in [client/client.ts:73](https://github.com/BetterTyped/hyper-fetch/blob/c44d728f/packages/core/src/client/client.ts#L73)

</p><div class="api-docs__section">

#### Type

</div><div class="api-docs__property-type">

```ts
QueryStringifyOptionsType
```

</div><hr/></div><div class="api-docs__property" property-data="requestManager"><h3 class="api-docs__name">

### `requestManager`

</h3><div class="api-docs__section">

#### Description

</div><div class="api-docs__description"><span class="api-docs__do-not-parse">



</span></div><p class="api-docs__definition">

Defined in [client/client.ts:55](https://github.com/BetterTyped/hyper-fetch/blob/c44d728f/packages/core/src/client/client.ts#L55)

</p><div class="api-docs__section">

#### Type

</div><div class="api-docs__property-type">

```ts
RequestManager
```

</div><hr/></div><div class="api-docs__property" property-data="submitDispatcher"><h3 class="api-docs__name">

### `submitDispatcher`

</h3><div class="api-docs__section">

#### Description

</div><div class="api-docs__description"><span class="api-docs__do-not-parse">



</span></div><p class="api-docs__definition">

Defined in [client/client.ts:63](https://github.com/BetterTyped/hyper-fetch/blob/c44d728f/packages/core/src/client/client.ts#L63)

</p><div class="api-docs__section">

#### Type

</div><div class="api-docs__property-type">

```ts
Dispatcher
```

</div><hr/></div><div class="api-docs__property" property-data="url"><h3 class="api-docs__name">

### `url`

</h3><div class="api-docs__section">

#### Description

</div><div class="api-docs__description"><span class="api-docs__do-not-parse">



</span></div><p class="api-docs__definition">

Defined in [client/client.ts:44](https://github.com/BetterTyped/hyper-fetch/blob/c44d728f/packages/core/src/client/client.ts#L44)

</p><div class="api-docs__section">

#### Type

</div><div class="api-docs__property-type">

```ts
string
```

</div><hr/></div><div class="api-docs__property" property-data="__onAuthCallbacks"><h3 class="api-docs__name">

### `__onAuthCallbacks`

</h3><div class="api-docs__section">

#### Description

</div><div class="api-docs__description"><span class="api-docs__do-not-parse">



</span></div><p class="api-docs__definition">

Defined in [client/client.ts:51](https://github.com/BetterTyped/hyper-fetch/blob/c44d728f/packages/core/src/client/client.ts#L51)

</p><div class="api-docs__section">

#### Type

</div><div class="api-docs__property-type">

```ts
RequestInterceptorType[]
```

</div><hr/></div><div class="api-docs__property" property-data="__onErrorCallbacks"><h3 class="api-docs__name">

### `__onErrorCallbacks`

</h3><div class="api-docs__section">

#### Description

</div><div class="api-docs__description"><span class="api-docs__do-not-parse">



</span></div><p class="api-docs__definition">

Defined in [client/client.ts:48](https://github.com/BetterTyped/hyper-fetch/blob/c44d728f/packages/core/src/client/client.ts#L48)

</p><div class="api-docs__section">

#### Type

</div><div class="api-docs__property-type">

```ts
ResponseInterceptorType<any, any, BaseAdapterType<Partial<XMLHttpRequest>, HttpMethodsType, number, AdapterAdditionalDataType, string | QueryParamsType>>[]
```

</div><hr/></div><div class="api-docs__property" property-data="__onRequestCallbacks"><h3 class="api-docs__name">

### `__onRequestCallbacks`

</h3><div class="api-docs__section">

#### Description

</div><div class="api-docs__description"><span class="api-docs__do-not-parse">



</span></div><p class="api-docs__definition">

Defined in [client/client.ts:52](https://github.com/BetterTyped/hyper-fetch/blob/c44d728f/packages/core/src/client/client.ts#L52)

</p><div class="api-docs__section">

#### Type

</div><div class="api-docs__property-type">

```ts
RequestInterceptorType[]
```

</div><hr/></div><div class="api-docs__property" property-data="__onResponseCallbacks"><h3 class="api-docs__name">

### `__onResponseCallbacks`

</h3><div class="api-docs__section">

#### Description

</div><div class="api-docs__description"><span class="api-docs__do-not-parse">



</span></div><p class="api-docs__definition">

Defined in [client/client.ts:50](https://github.com/BetterTyped/hyper-fetch/blob/c44d728f/packages/core/src/client/client.ts#L50)

</p><div class="api-docs__section">

#### Type

</div><div class="api-docs__property-type">

```ts
ResponseInterceptorType<any, any, BaseAdapterType<Partial<XMLHttpRequest>, HttpMethodsType, number, AdapterAdditionalDataType, string | QueryParamsType>>[]
```

</div><hr/></div><div class="api-docs__property" property-data="__onSuccessCallbacks"><h3 class="api-docs__name">

### `__onSuccessCallbacks`

</h3><div class="api-docs__section">

#### Description

</div><div class="api-docs__description"><span class="api-docs__do-not-parse">



</span></div><p class="api-docs__definition">

Defined in [client/client.ts:49](https://github.com/BetterTyped/hyper-fetch/blob/c44d728f/packages/core/src/client/client.ts#L49)

</p><div class="api-docs__section">

#### Type

</div><div class="api-docs__property-type">

```ts
ResponseInterceptorType<any, any, BaseAdapterType<Partial<XMLHttpRequest>, HttpMethodsType, number, AdapterAdditionalDataType, string | QueryParamsType>>[]
```

</div><hr/></div></div><div class="api-docs__section">

## Methods

</div><div class="api-docs__methods"><div class="api-docs__method" method-data="abortKeyMapper"><h3 class="api-docs__name">

### `abortKeyMapper()`

</h3><div class="api-docs__section">

#### Description

</div><div class="api-docs__description"><span class="api-docs__do-not-parse">



</span></div><p class="api-docs__definition">

Defined in [client/client.ts:78](https://github.com/BetterTyped/hyper-fetch/blob/c44d728f/packages/core/src/client/client.ts#L78)

</p><div class="api-docs__section">

#### Return

</div><div class="api-docs__returns">

```ts
(request: RequestInstance) => string
```

</div><hr/></div><div class="api-docs__method" method-data="adapterDefaultOptions"><h3 class="api-docs__name">

### `adapterDefaultOptions()`

</h3><div class="api-docs__section">

#### Description

</div><div class="api-docs__description"><span class="api-docs__do-not-parse">



</span></div><p class="api-docs__definition">

Defined in [client/client.ts:74](https://github.com/BetterTyped/hyper-fetch/blob/c44d728f/packages/core/src/client/client.ts#L74)

</p><div class="api-docs__section">

#### Return

</div><div class="api-docs__returns">

```ts
(request: RequestInstance) => ExtractAdapterOptions<AdapterType>
```

</div><hr/></div><div class="api-docs__method" method-data="cacheKeyMapper"><h3 class="api-docs__name">

### `cacheKeyMapper()`

</h3><div class="api-docs__section">

#### Description

</div><div class="api-docs__description"><span class="api-docs__do-not-parse">



</span></div><p class="api-docs__definition">

Defined in [client/client.ts:79](https://github.com/BetterTyped/hyper-fetch/blob/c44d728f/packages/core/src/client/client.ts#L79)

</p><div class="api-docs__section">

#### Return

</div><div class="api-docs__returns">

```ts
(request: RequestInstance) => string
```

</div><hr/></div><div class="api-docs__method" method-data="effectKeyMapper"><h3 class="api-docs__name">

### `effectKeyMapper()`

</h3><div class="api-docs__section">

#### Description

</div><div class="api-docs__description"><span class="api-docs__do-not-parse">



</span></div><p class="api-docs__definition">

Defined in [client/client.ts:81](https://github.com/BetterTyped/hyper-fetch/blob/c44d728f/packages/core/src/client/client.ts#L81)

</p><div class="api-docs__section">

#### Return

</div><div class="api-docs__returns">

```ts
(request: RequestInstance) => string
```

</div><hr/></div><div class="api-docs__method" method-data="headerMapper"><h3 class="api-docs__name">

### `headerMapper()`

</h3><div class="api-docs__section">

#### Description

</div><div class="api-docs__description"><span class="api-docs__do-not-parse">

Method to get default headers and to map them based on the data format exchange, by default it handles FormData / JSON formats.

</span></div><p class="api-docs__definition">

Defined in [client/client.ts:93](https://github.com/BetterTyped/hyper-fetch/blob/c44d728f/packages/core/src/client/client.ts#L93)

</p><div class="api-docs__section">

#### Return

</div><div class="api-docs__returns">

```ts
(request: T) => HeadersInit
```

</div><hr/></div><div class="api-docs__method" method-data="payloadMapper"><h3 class="api-docs__name">

### `payloadMapper()`

</h3><div class="api-docs__section">

#### Description

</div><div class="api-docs__description"><span class="api-docs__do-not-parse">

Method to get request data and transform them to the required format. It handles FormData and JSON by default.

</span></div><p class="api-docs__definition">

Defined in [client/client.ts:97](https://github.com/BetterTyped/hyper-fetch/blob/c44d728f/packages/core/src/client/client.ts#L97)

</p><div class="api-docs__section">

#### Return

</div><div class="api-docs__returns">

```ts
(data: unknown) => string | FormData
```

</div><hr/></div><div class="api-docs__method" method-data="queueKeyMapper"><h3 class="api-docs__name">

### `queueKeyMapper()`

</h3><div class="api-docs__section">

#### Description

</div><div class="api-docs__description"><span class="api-docs__do-not-parse">



</span></div><p class="api-docs__definition">

Defined in [client/client.ts:80](https://github.com/BetterTyped/hyper-fetch/blob/c44d728f/packages/core/src/client/client.ts#L80)

</p><div class="api-docs__section">

#### Return

</div><div class="api-docs__returns">

```ts
(request: RequestInstance) => string
```

</div><hr/></div><div class="api-docs__method" method-data="requestDefaultOptions"><h3 class="api-docs__name">

### `requestDefaultOptions()`

</h3><div class="api-docs__section">

#### Description

</div><div class="api-docs__description"><span class="api-docs__do-not-parse">



</span></div><p class="api-docs__definition">

Defined in [client/client.ts:75](https://github.com/BetterTyped/hyper-fetch/blob/c44d728f/packages/core/src/client/client.ts#L75)

</p><div class="api-docs__section">

#### Return

</div><div class="api-docs__returns">

```ts
(options: RequestOptionsType<string, ExtractAdapterOptions<AdapterType>, ExtractAdapterMethodType<AdapterType>>) => Partial<RequestOptionsType<string, ExtractAdapterOptions<AdapterType>, ExtractAdapterMethodType<AdapterType>>>
```

</div><hr/></div><div class="api-docs__method" method-data="stringifyQueryParams"><h3 class="api-docs__name">

### `stringifyQueryParams()`

</h3><div class="api-docs__section">

#### Description

</div><div class="api-docs__description"><span class="api-docs__do-not-parse">

Method to stringify query params from objects.

</span></div><p class="api-docs__definition">

Defined in [client/client.ts:88](https://github.com/BetterTyped/hyper-fetch/blob/c44d728f/packages/core/src/client/client.ts#L88)

</p><div class="api-docs__section">

#### Return

</div><div class="api-docs__returns">

```ts
(queryParams: QueryParamsType | string | NegativeTypes) => string
```

</div><hr/></div><div class="api-docs__method" method-data="addEffect"><h3 class="api-docs__name">

### `addEffect()`

</h3><div class="api-docs__section">

#### Preview

</div><div class="api-docs__preview fn">

```ts
addEffect(effect)
```

</div><div class="api-docs__section">

#### Description

</div><div class="api-docs__description"><span class="api-docs__do-not-parse">

Add persistent effects which trigger on the request lifecycle

</span></div><p class="api-docs__definition">

Defined in [client/client.ts:265](https://github.com/BetterTyped/hyper-fetch/blob/c44d728f/packages/core/src/client/client.ts#L265)

</p><div class="api-docs__section">

#### Parameters

</div><div class="api-docs__parameters"><table><thead><tr><th>Name</th><th>Details</th></tr></thead><tbody><tr param-data="effect"><td class="api-docs__param-name required">

#### effect 

`Required`

</td><td class="api-docs__param-type">

`RequestEffectInstance | RequestEffectInstance[]`

</td></tr></tbody></table></div><div class="api-docs__section">

#### Return

</div><div class="api-docs__returns">

```ts
this
```

</div><hr/></div><div class="api-docs__method" method-data="clear"><h3 class="api-docs__name">

### `clear()`

</h3><div class="api-docs__section">

#### Preview

</div><div class="api-docs__preview fn">

```ts
clear()
```

</div><div class="api-docs__section">

#### Description

</div><div class="api-docs__description"><span class="api-docs__do-not-parse">

Clears the Client instance and remove all listeners on it&#x27;s dependencies

</span></div><p class="api-docs__definition">

Defined in [client/client.ts:335](https://github.com/BetterTyped/hyper-fetch/blob/c44d728f/packages/core/src/client/client.ts#L335)

</p><div class="api-docs__section">

#### Return

</div><div class="api-docs__returns">

```ts
void
```

</div><hr/></div><div class="api-docs__method" method-data="createRequest"><h3 class="api-docs__name">

### `createRequest()`

</h3><div class="api-docs__section">

#### Preview

</div><div class="api-docs__preview fn">

```ts
createRequest<Response, Payload, LocalError, QueryParams>()
```

</div><div class="api-docs__section">

#### Description

</div><div class="api-docs__description"><span class="api-docs__do-not-parse">

Create requests based on the Client setup

</span></div><p class="api-docs__definition">

Defined in [client/client.ts:357](https://github.com/BetterTyped/hyper-fetch/blob/c44d728f/packages/core/src/client/client.ts#L357)

</p><div class="api-docs__section">

#### Return

</div><div class="api-docs__returns">

```ts
(params: RequestOptionsType<EndpointType, AdapterOptions, MethodType>) => Request<Response, Payload, QueryParams, GlobalErrorType, LocalError, EndpointType, ExtractUnionAdapter<AdapterType, [object Object]>, false, false, false>
```

</div><hr/></div><div class="api-docs__method" method-data="onAuth"><h3 class="api-docs__name">

### `onAuth()`

</h3><div class="api-docs__section">

#### Preview

</div><div class="api-docs__preview fn">

```ts
onAuth(callback)
```

</div><div class="api-docs__section">

#### Description

</div><div class="api-docs__description"><span class="api-docs__do-not-parse">

Method of manipulating requests before sending the request. We can for example add custom header with token to the request which request had the auth set to true.

</span></div><p class="api-docs__definition">

Defined in [client/client.ts:219](https://github.com/BetterTyped/hyper-fetch/blob/c44d728f/packages/core/src/client/client.ts#L219)

</p><div class="api-docs__section">

#### Parameters

</div><div class="api-docs__parameters"><table><thead><tr><th>Name</th><th>Details</th></tr></thead><tbody><tr param-data="callback"><td class="api-docs__param-name required">

#### callback 

`Required`

</td><td class="api-docs__param-type">

`RequestInterceptorType`

</td></tr></tbody></table></div><div class="api-docs__section">

#### Return

</div><div class="api-docs__returns">

```ts
Client<GlobalErrorType, AdapterType>
```

</div><hr/></div><div class="api-docs__method" method-data="onError"><h3 class="api-docs__name">

### `onError()`

</h3><div class="api-docs__section">

#### Preview

</div><div class="api-docs__preview fn">

```ts
onError<ErrorType>(callback)
```

</div><div class="api-docs__section">

#### Description

</div><div class="api-docs__description"><span class="api-docs__do-not-parse">

Method for intercepting error responses. It can be used for example to refresh tokens.

</span></div><p class="api-docs__definition">

Defined in [client/client.ts:227](https://github.com/BetterTyped/hyper-fetch/blob/c44d728f/packages/core/src/client/client.ts#L227)

</p><div class="api-docs__section">

#### Parameters

</div><div class="api-docs__parameters"><table><thead><tr><th>Name</th><th>Details</th></tr></thead><tbody><tr param-data="callback"><td class="api-docs__param-name required">

#### callback 

`Required`

</td><td class="api-docs__param-type">

`ResponseInterceptorType<any, GlobalErrorType | ErrorType, AdapterType>`

</td></tr></tbody></table></div><div class="api-docs__section">

#### Return

</div><div class="api-docs__returns">

```ts
Client<GlobalErrorType, AdapterType>
```

</div><hr/></div><div class="api-docs__method" method-data="onRequest"><h3 class="api-docs__name">

### `onRequest()`

</h3><div class="api-docs__section">

#### Preview

</div><div class="api-docs__preview fn">

```ts
onRequest(callback)
```

</div><div class="api-docs__section">

#### Description

</div><div class="api-docs__description"><span class="api-docs__do-not-parse">

Method of manipulating requests before sending the request.

</span></div><p class="api-docs__definition">

Defined in [client/client.ts:247](https://github.com/BetterTyped/hyper-fetch/blob/c44d728f/packages/core/src/client/client.ts#L247)

</p><div class="api-docs__section">

#### Parameters

</div><div class="api-docs__parameters"><table><thead><tr><th>Name</th><th>Details</th></tr></thead><tbody><tr param-data="callback"><td class="api-docs__param-name required">

#### callback 

`Required`

</td><td class="api-docs__param-type">

`RequestInterceptorType`

</td></tr></tbody></table></div><div class="api-docs__section">

#### Return

</div><div class="api-docs__returns">

```ts
Client<GlobalErrorType, AdapterType>
```

</div><hr/></div><div class="api-docs__method" method-data="onResponse"><h3 class="api-docs__name">

### `onResponse()`

</h3><div class="api-docs__section">

#### Preview

</div><div class="api-docs__preview fn">

```ts
onResponse<ErrorType>(callback)
```

</div><div class="api-docs__section">

#### Description

</div><div class="api-docs__description"><span class="api-docs__do-not-parse">

Method for intercepting any responses.

</span></div><p class="api-docs__definition">

Defined in [client/client.ts:255](https://github.com/BetterTyped/hyper-fetch/blob/c44d728f/packages/core/src/client/client.ts#L255)

</p><div class="api-docs__section">

#### Parameters

</div><div class="api-docs__parameters"><table><thead><tr><th>Name</th><th>Details</th></tr></thead><tbody><tr param-data="callback"><td class="api-docs__param-name required">

#### callback 

`Required`

</td><td class="api-docs__param-type">

`ResponseInterceptorType<any, GlobalErrorType | ErrorType, AdapterType>`

</td></tr></tbody></table></div><div class="api-docs__section">

#### Return

</div><div class="api-docs__returns">

```ts
Client<GlobalErrorType, AdapterType>
```

</div><hr/></div><div class="api-docs__method" method-data="onSuccess"><h3 class="api-docs__name">

### `onSuccess()`

</h3><div class="api-docs__section">

#### Preview

</div><div class="api-docs__preview fn">

```ts
onSuccess<ErrorType>(callback)
```

</div><div class="api-docs__section">

#### Description

</div><div class="api-docs__description"><span class="api-docs__do-not-parse">

Method for intercepting success responses.

</span></div><p class="api-docs__definition">

Defined in [client/client.ts:237](https://github.com/BetterTyped/hyper-fetch/blob/c44d728f/packages/core/src/client/client.ts#L237)

</p><div class="api-docs__section">

#### Parameters

</div><div class="api-docs__parameters"><table><thead><tr><th>Name</th><th>Details</th></tr></thead><tbody><tr param-data="callback"><td class="api-docs__param-name required">

#### callback 

`Required`

</td><td class="api-docs__param-type">

`ResponseInterceptorType<any, GlobalErrorType | ErrorType, AdapterType>`

</td></tr></tbody></table></div><div class="api-docs__section">

#### Return

</div><div class="api-docs__returns">

```ts
Client<GlobalErrorType, AdapterType>
```

</div><hr/></div><div class="api-docs__method" method-data="removeEffect"><h3 class="api-docs__name">

### `removeEffect()`

</h3><div class="api-docs__section">

#### Preview

</div><div class="api-docs__preview fn">

```ts
removeEffect(effect)
```

</div><div class="api-docs__section">

#### Description

</div><div class="api-docs__description"><span class="api-docs__do-not-parse">

Remove effects from Client

</span></div><p class="api-docs__definition">

Defined in [client/client.ts:274](https://github.com/BetterTyped/hyper-fetch/blob/c44d728f/packages/core/src/client/client.ts#L274)

</p><div class="api-docs__section">

#### Parameters

</div><div class="api-docs__parameters"><table><thead><tr><th>Name</th><th>Details</th></tr></thead><tbody><tr param-data="effect"><td class="api-docs__param-name required">

#### effect 

`Required`

</td><td class="api-docs__param-type">

`string | RequestEffectInstance`

</td></tr></tbody></table></div><div class="api-docs__section">

#### Return

</div><div class="api-docs__returns">

```ts
this
```

</div><hr/></div><div class="api-docs__method" method-data="setAbortKeyMapper"><h3 class="api-docs__name">

### `setAbortKeyMapper()`

</h3><div class="api-docs__section">

#### Preview

</div><div class="api-docs__preview fn">

```ts
setAbortKeyMapper(callback)
```

</div><div class="api-docs__section">

#### Description

</div><div class="api-docs__description"><span class="api-docs__do-not-parse">

Key setters

</span></div><p class="api-docs__definition">

Defined in [client/client.ts:285](https://github.com/BetterTyped/hyper-fetch/blob/c44d728f/packages/core/src/client/client.ts#L285)

</p><div class="api-docs__section">

#### Parameters

</div><div class="api-docs__parameters"><table><thead><tr><th>Name</th><th>Details</th></tr></thead><tbody><tr param-data="callback"><td class="api-docs__param-name required">

#### callback 

`Required`

</td><td class="api-docs__param-type">

`(request: RequestInstance) => string`

</td></tr></tbody></table></div><div class="api-docs__section">

#### Return

</div><div class="api-docs__returns">

```ts
void
```

</div><hr/></div><div class="api-docs__method" method-data="setAdapter"><h3 class="api-docs__name">

### `setAdapter()`

</h3><div class="api-docs__section">

#### Preview

</div><div class="api-docs__preview fn">

```ts
setAdapter<NewAdapterType>(callback)
```

</div><div class="api-docs__section">

#### Description

</div><div class="api-docs__description"><span class="api-docs__do-not-parse">

Set custom http adapter to handle graphql, rest, firebase or others

</span></div><p class="api-docs__definition">

Defined in [client/client.ts:193](https://github.com/BetterTyped/hyper-fetch/blob/c44d728f/packages/core/src/client/client.ts#L193)

</p><div class="api-docs__section">

#### Parameters

</div><div class="api-docs__parameters"><table><thead><tr><th>Name</th><th>Details</th></tr></thead><tbody><tr param-data="callback"><td class="api-docs__param-name required">

#### callback 

`Required`

</td><td class="api-docs__param-type">

`(Client: ClientInstance) => NewAdapterType`

</td></tr></tbody></table></div><div class="api-docs__section">

#### Return

</div><div class="api-docs__returns">

```ts
Client<GlobalErrorType, NewAdapterType>
```

</div><hr/></div><div class="api-docs__method" method-data="setAdapterDefaultOptions"><h3 class="api-docs__name">

### `setAdapterDefaultOptions()`

</h3><div class="api-docs__section">

#### Preview

</div><div class="api-docs__preview fn">

```ts
setAdapterDefaultOptions(callback)
```

</div><div class="api-docs__section">

#### Description

</div><div class="api-docs__description"><span class="api-docs__do-not-parse">



</span></div><p class="api-docs__definition">

Defined in [client/client.ts:126](https://github.com/BetterTyped/hyper-fetch/blob/c44d728f/packages/core/src/client/client.ts#L126)

</p><div class="api-docs__section">

#### Parameters

</div><div class="api-docs__parameters"><table><thead><tr><th>Name</th><th>Details</th></tr></thead><tbody><tr param-data="callback"><td class="api-docs__param-name required">

#### callback 

`Required`

</td><td class="api-docs__param-type">

`(request: RequestInstance) => ExtractAdapterOptions<AdapterType>`

</td></tr></tbody></table></div><div class="api-docs__section">

#### Return

</div><div class="api-docs__returns">

```ts
Client<GlobalErrorType, AdapterType>
```

</div><hr/></div><div class="api-docs__method" method-data="setCacheKeyMapper"><h3 class="api-docs__name">

### `setCacheKeyMapper()`

</h3><div class="api-docs__section">

#### Preview

</div><div class="api-docs__preview fn">

```ts
setCacheKeyMapper(callback)
```

</div><div class="api-docs__section">

#### Description

</div><div class="api-docs__description"><span class="api-docs__do-not-parse">



</span></div><p class="api-docs__definition">

Defined in [client/client.ts:288](https://github.com/BetterTyped/hyper-fetch/blob/c44d728f/packages/core/src/client/client.ts#L288)

</p><div class="api-docs__section">

#### Parameters

</div><div class="api-docs__parameters"><table><thead><tr><th>Name</th><th>Details</th></tr></thead><tbody><tr param-data="callback"><td class="api-docs__param-name required">

#### callback 

`Required`

</td><td class="api-docs__param-type">

`(request: RequestInstance) => string`

</td></tr></tbody></table></div><div class="api-docs__section">

#### Return

</div><div class="api-docs__returns">

```ts
void
```

</div><hr/></div><div class="api-docs__method" method-data="setDebug"><h3 class="api-docs__name">

### `setDebug()`

</h3><div class="api-docs__section">

#### Preview

</div><div class="api-docs__preview fn">

```ts
setDebug(debug)
```

</div><div class="api-docs__section">

#### Description

</div><div class="api-docs__description"><span class="api-docs__do-not-parse">

This method enables the logger usage and display the logs in console

</span></div><p class="api-docs__definition">

Defined in [client/client.ts:136](https://github.com/BetterTyped/hyper-fetch/blob/c44d728f/packages/core/src/client/client.ts#L136)

</p><div class="api-docs__section">

#### Parameters

</div><div class="api-docs__parameters"><table><thead><tr><th>Name</th><th>Details</th></tr></thead><tbody><tr param-data="debug"><td class="api-docs__param-name required">

#### debug 

`Required`

</td><td class="api-docs__param-type">

`boolean`

</td></tr></tbody></table></div><div class="api-docs__section">

#### Return

</div><div class="api-docs__returns">

```ts
Client<GlobalErrorType, AdapterType>
```

</div><hr/></div><div class="api-docs__method" method-data="setDefaultAdditionalData"><h3 class="api-docs__name">

### `setDefaultAdditionalData()`

</h3><div class="api-docs__section">

#### Preview

</div><div class="api-docs__preview fn">

```ts
setDefaultAdditionalData(defaultAdditionalData)
```

</div><div class="api-docs__section">

#### Description

</div><div class="api-docs__description"><span class="api-docs__do-not-parse">

Set default additional data for initial state.

</span></div><p class="api-docs__definition">

Defined in [client/client.ts:211](https://github.com/BetterTyped/hyper-fetch/blob/c44d728f/packages/core/src/client/client.ts#L211)

</p><div class="api-docs__section">

#### Parameters

</div><div class="api-docs__parameters"><table><thead><tr><th>Name</th><th>Details</th></tr></thead><tbody><tr param-data="defaultAdditionalData"><td class="api-docs__param-name required">

#### defaultAdditionalData 

`Required`

</td><td class="api-docs__param-type">

`ExtractAdapterAdditionalDataType<AdapterType>`

</td></tr></tbody></table></div><div class="api-docs__section">

#### Return

</div><div class="api-docs__returns">

```ts
Client<any, BaseAdapterType<any, any, any, any>>
```

</div><hr/></div><div class="api-docs__method" method-data="setDefaultMethod"><h3 class="api-docs__name">

### `setDefaultMethod()`

</h3><div class="api-docs__section">

#### Preview

</div><div class="api-docs__preview fn">

```ts
setDefaultMethod(defaultMethod)
```

</div><div class="api-docs__section">

#### Description

</div><div class="api-docs__description"><span class="api-docs__do-not-parse">

Set default method for requests.

</span></div><p class="api-docs__definition">

Defined in [client/client.ts:203](https://github.com/BetterTyped/hyper-fetch/blob/c44d728f/packages/core/src/client/client.ts#L203)

</p><div class="api-docs__section">

#### Parameters

</div><div class="api-docs__parameters"><table><thead><tr><th>Name</th><th>Details</th></tr></thead><tbody><tr param-data="defaultMethod"><td class="api-docs__param-name required">

#### defaultMethod 

`Required`

</td><td class="api-docs__param-type">

`ExtractAdapterMethodType<AdapterType>`

</td></tr></tbody></table></div><div class="api-docs__section">

#### Return

</div><div class="api-docs__returns">

```ts
Client<any, BaseAdapterType<any, any, any, any>>
```

</div><hr/></div><div class="api-docs__method" method-data="setEffectKeyMapper"><h3 class="api-docs__name">

### `setEffectKeyMapper()`

</h3><div class="api-docs__section">

#### Preview

</div><div class="api-docs__preview fn">

```ts
setEffectKeyMapper(callback)
```

</div><div class="api-docs__section">

#### Description

</div><div class="api-docs__description"><span class="api-docs__do-not-parse">



</span></div><p class="api-docs__definition">

Defined in [client/client.ts:294](https://github.com/BetterTyped/hyper-fetch/blob/c44d728f/packages/core/src/client/client.ts#L294)

</p><div class="api-docs__section">

#### Parameters

</div><div class="api-docs__parameters"><table><thead><tr><th>Name</th><th>Details</th></tr></thead><tbody><tr param-data="callback"><td class="api-docs__param-name required">

#### callback 

`Required`

</td><td class="api-docs__param-type">

`(request: RequestInstance) => string`

</td></tr></tbody></table></div><div class="api-docs__section">

#### Return

</div><div class="api-docs__returns">

```ts
void
```

</div><hr/></div><div class="api-docs__method" method-data="setHeaderMapper"><h3 class="api-docs__name">

### `setHeaderMapper()`

</h3><div class="api-docs__section">

#### Preview

</div><div class="api-docs__preview fn">

```ts
setHeaderMapper(headerMapper)
```

</div><div class="api-docs__section">

#### Description

</div><div class="api-docs__description"><span class="api-docs__do-not-parse">

Set the custom header mapping function

</span></div><p class="api-docs__definition">

Defined in [client/client.ts:177](https://github.com/BetterTyped/hyper-fetch/blob/c44d728f/packages/core/src/client/client.ts#L177)

</p><div class="api-docs__section">

#### Parameters

</div><div class="api-docs__parameters"><table><thead><tr><th>Name</th><th>Details</th></tr></thead><tbody><tr param-data="headerMapper"><td class="api-docs__param-name required">

#### headerMapper 

`Required`

</td><td class="api-docs__param-type">

`HeaderMappingType`

</td></tr></tbody></table></div><div class="api-docs__section">

#### Return

</div><div class="api-docs__returns">

```ts
Client<GlobalErrorType, AdapterType>
```

</div><hr/></div><div class="api-docs__method" method-data="setLogger"><h3 class="api-docs__name">

### `setLogger()`

</h3><div class="api-docs__section">

#### Preview

</div><div class="api-docs__preview fn">

```ts
setLogger(callback)
```

</div><div class="api-docs__section">

#### Description

</div><div class="api-docs__description"><span class="api-docs__do-not-parse">

Set the new logger instance to the Client

</span></div><p class="api-docs__definition">

Defined in [client/client.ts:152](https://github.com/BetterTyped/hyper-fetch/blob/c44d728f/packages/core/src/client/client.ts#L152)

</p><div class="api-docs__section">

#### Parameters

</div><div class="api-docs__parameters"><table><thead><tr><th>Name</th><th>Details</th></tr></thead><tbody><tr param-data="callback"><td class="api-docs__param-name required">

#### callback 

`Required`

</td><td class="api-docs__param-type">

`(Client: ClientInstance) => LoggerManager`

</td></tr></tbody></table></div><div class="api-docs__section">

#### Return

</div><div class="api-docs__returns">

```ts
Client<GlobalErrorType, AdapterType>
```

</div><hr/></div><div class="api-docs__method" method-data="setLoggerSeverity"><h3 class="api-docs__name">

### `setLoggerSeverity()`

</h3><div class="api-docs__section">

#### Preview

</div><div class="api-docs__preview fn">

```ts
setLoggerSeverity(severity)
```

</div><div class="api-docs__section">

#### Description

</div><div class="api-docs__description"><span class="api-docs__do-not-parse">

Set the logger severity of the messages displayed to the console

</span></div><p class="api-docs__definition">

Defined in [client/client.ts:144](https://github.com/BetterTyped/hyper-fetch/blob/c44d728f/packages/core/src/client/client.ts#L144)

</p><div class="api-docs__section">

#### Parameters

</div><div class="api-docs__parameters"><table><thead><tr><th>Name</th><th>Details</th></tr></thead><tbody><tr param-data="severity"><td class="api-docs__param-name required">

#### severity 

`Required`

</td><td class="api-docs__param-type">

`SeverityType`

</td></tr></tbody></table></div><div class="api-docs__section">

#### Return

</div><div class="api-docs__returns">

```ts
Client<GlobalErrorType, AdapterType>
```

</div><hr/></div><div class="api-docs__method" method-data="setPayloadMapper"><h3 class="api-docs__name">

### `setPayloadMapper()`

</h3><div class="api-docs__section">

#### Preview

</div><div class="api-docs__preview fn">

```ts
setPayloadMapper(payloadMapper)
```

</div><div class="api-docs__section">

#### Description

</div><div class="api-docs__description"><span class="api-docs__do-not-parse">

Set the request payload mapping function which get triggered before request get send

</span></div><p class="api-docs__definition">

Defined in [client/client.ts:185](https://github.com/BetterTyped/hyper-fetch/blob/c44d728f/packages/core/src/client/client.ts#L185)

</p><div class="api-docs__section">

#### Parameters

</div><div class="api-docs__parameters"><table><thead><tr><th>Name</th><th>Details</th></tr></thead><tbody><tr param-data="payloadMapper"><td class="api-docs__param-name required">

#### payloadMapper 

`Required`

</td><td class="api-docs__param-type">

`AdapterPayloadMappingType`

</td></tr></tbody></table></div><div class="api-docs__section">

#### Return

</div><div class="api-docs__returns">

```ts
Client<GlobalErrorType, AdapterType>
```

</div><hr/></div><div class="api-docs__method" method-data="setQueryParamsConfig"><h3 class="api-docs__name">

### `setQueryParamsConfig()`

</h3><div class="api-docs__section">

#### Preview

</div><div class="api-docs__preview fn">

```ts
setQueryParamsConfig(queryParamsConfig)
```

</div><div class="api-docs__section">

#### Description

</div><div class="api-docs__description"><span class="api-docs__do-not-parse">

Set config for the query params stringify method, we can set here, among others, arrayFormat, skipNull, encode, skipEmptyString and more

</span></div><p class="api-docs__definition">

Defined in [client/client.ts:160](https://github.com/BetterTyped/hyper-fetch/blob/c44d728f/packages/core/src/client/client.ts#L160)

</p><div class="api-docs__section">

#### Parameters

</div><div class="api-docs__parameters"><table><thead><tr><th>Name</th><th>Details</th></tr></thead><tbody><tr param-data="queryParamsConfig"><td class="api-docs__param-name required">

#### queryParamsConfig 

`Required`

</td><td class="api-docs__param-type">

`QueryStringifyOptionsType`

</td></tr></tbody></table></div><div class="api-docs__section">

#### Return

</div><div class="api-docs__returns">

```ts
Client<GlobalErrorType, AdapterType>
```

</div><hr/></div><div class="api-docs__method" method-data="setQueueKeyMapper"><h3 class="api-docs__name">

### `setQueueKeyMapper()`

</h3><div class="api-docs__section">

#### Preview

</div><div class="api-docs__preview fn">

```ts
setQueueKeyMapper(callback)
```

</div><div class="api-docs__section">

#### Description

</div><div class="api-docs__description"><span class="api-docs__do-not-parse">



</span></div><p class="api-docs__definition">

Defined in [client/client.ts:291](https://github.com/BetterTyped/hyper-fetch/blob/c44d728f/packages/core/src/client/client.ts#L291)

</p><div class="api-docs__section">

#### Parameters

</div><div class="api-docs__parameters"><table><thead><tr><th>Name</th><th>Details</th></tr></thead><tbody><tr param-data="callback"><td class="api-docs__param-name required">

#### callback 

`Required`

</td><td class="api-docs__param-type">

`(request: RequestInstance) => string`

</td></tr></tbody></table></div><div class="api-docs__section">

#### Return

</div><div class="api-docs__returns">

```ts
void
```

</div><hr/></div><div class="api-docs__method" method-data="setRequestDefaultOptions"><h3 class="api-docs__name">

### `setRequestDefaultOptions()`

</h3><div class="api-docs__section">

#### Preview

</div><div class="api-docs__preview fn">

```ts
setRequestDefaultOptions(callback)
```

</div><div class="api-docs__section">

#### Description

</div><div class="api-docs__description"><span class="api-docs__do-not-parse">

This method allows to configure global defaults for the request configuration like method, auth, deduplication etc.

</span></div><p class="api-docs__definition">

Defined in [client/client.ts:117](https://github.com/BetterTyped/hyper-fetch/blob/c44d728f/packages/core/src/client/client.ts#L117)

</p><div class="api-docs__section">

#### Parameters

</div><div class="api-docs__parameters"><table><thead><tr><th>Name</th><th>Details</th></tr></thead><tbody><tr param-data="callback"><td class="api-docs__param-name required">

#### callback 

`Required`

</td><td class="api-docs__param-type">

`(request: RequestInstance) => Partial<RequestOptionsType<string, ExtractAdapterOptions<AdapterType>, ExtractAdapterMethodType<AdapterType>>>`

</td></tr></tbody></table></div><div class="api-docs__section">

#### Return

</div><div class="api-docs__returns">

```ts
Client<GlobalErrorType, AdapterType>
```

</div><hr/></div><div class="api-docs__method" method-data="setStringifyQueryParams"><h3 class="api-docs__name">

### `setStringifyQueryParams()`

</h3><div class="api-docs__section">

#### Preview

</div><div class="api-docs__preview fn">

```ts
setStringifyQueryParams(stringifyFn)
```

</div><div class="api-docs__section">

#### Description

</div><div class="api-docs__description"><span class="api-docs__do-not-parse">

Set the custom query params stringify method to the Client

</span></div><p class="api-docs__definition">

Defined in [client/client.ts:169](https://github.com/BetterTyped/hyper-fetch/blob/c44d728f/packages/core/src/client/client.ts#L169)

</p><div class="api-docs__section">

#### Parameters

</div><div class="api-docs__parameters"><table><thead><tr><th>Name</th><th>Details</th></tr></thead><tbody><tr param-data="stringifyFn"><td class="api-docs__param-name required">

#### stringifyFn 

`Required`

</td><td class="api-docs__param-type">

Custom callback handling query params stringify

`StringifyCallbackType`

</td></tr></tbody></table></div><div class="api-docs__section">

#### Return

</div><div class="api-docs__returns">

```ts
Client<GlobalErrorType, AdapterType>
```

</div><hr/></div><div class="api-docs__method" method-data="__modifyAuth"><h3 class="api-docs__name">

### `__modifyAuth()`

</h3><div class="api-docs__section">

#### Preview

</div><div class="api-docs__preview fn">

```ts
__modifyAuth(request)
```

</div><div class="api-docs__section">

#### Description

</div><div class="api-docs__description"><span class="api-docs__do-not-parse">

Helper used by http adapter to apply the modifications on response error

</span></div><p class="api-docs__definition">

Defined in [client/client.ts:301](https://github.com/BetterTyped/hyper-fetch/blob/c44d728f/packages/core/src/client/client.ts#L301)

</p><div class="api-docs__section">

#### Parameters

</div><div class="api-docs__parameters"><table><thead><tr><th>Name</th><th>Details</th></tr></thead><tbody><tr param-data="request"><td class="api-docs__param-name required">

#### request 

`Required`

</td><td class="api-docs__param-type">

`RequestInstance`

</td></tr></tbody></table></div><div class="api-docs__section">

#### Return

</div><div class="api-docs__returns">

```ts
Promise<RequestInstance>
```

</div><hr/></div><div class="api-docs__method" method-data="__modifyErrorResponse"><h3 class="api-docs__name">

### `__modifyErrorResponse()`

</h3><div class="api-docs__section">

#### Preview

</div><div class="api-docs__preview fn">

```ts
__modifyErrorResponse(response, request)
```

</div><div class="api-docs__section">

#### Description

</div><div class="api-docs__description"><span class="api-docs__do-not-parse">

Private helper to run async on-error response processing

</span></div><p class="api-docs__definition">

Defined in [client/client.ts:311](https://github.com/BetterTyped/hyper-fetch/blob/c44d728f/packages/core/src/client/client.ts#L311)

</p><div class="api-docs__section">

#### Parameters

</div><div class="api-docs__parameters"><table><thead><tr><th>Name</th><th>Details</th></tr></thead><tbody><tr param-data="response"><td class="api-docs__param-name required">

#### response 

`Required`

</td><td class="api-docs__param-type">

`ResponseReturnType<any, GlobalErrorType, AdapterType>`

</td></tr><tr param-data="request"><td class="api-docs__param-name required">

#### request 

`Required`

</td><td class="api-docs__param-type">

`RequestInstance`

</td></tr></tbody></table></div><div class="api-docs__section">

#### Return

</div><div class="api-docs__returns">

```ts
Promise<ResponseReturnType<any, GlobalErrorType, AdapterType>>
```

</div><hr/></div><div class="api-docs__method" method-data="__modifyRequest"><h3 class="api-docs__name">

### `__modifyRequest()`

</h3><div class="api-docs__section">

#### Preview

</div><div class="api-docs__preview fn">

```ts
__modifyRequest(request)
```

</div><div class="api-docs__section">

#### Description

</div><div class="api-docs__description"><span class="api-docs__do-not-parse">

Private helper to run async pre-request processing

</span></div><p class="api-docs__definition">

Defined in [client/client.ts:306](https://github.com/BetterTyped/hyper-fetch/blob/c44d728f/packages/core/src/client/client.ts#L306)

</p><div class="api-docs__section">

#### Parameters

</div><div class="api-docs__parameters"><table><thead><tr><th>Name</th><th>Details</th></tr></thead><tbody><tr param-data="request"><td class="api-docs__param-name required">

#### request 

`Required`

</td><td class="api-docs__param-type">

`RequestInstance`

</td></tr></tbody></table></div><div class="api-docs__section">

#### Return

</div><div class="api-docs__returns">

```ts
Promise<RequestInstance>
```

</div><hr/></div><div class="api-docs__method" method-data="__modifyResponse"><h3 class="api-docs__name">

### `__modifyResponse()`

</h3><div class="api-docs__section">

#### Preview

</div><div class="api-docs__preview fn">

```ts
__modifyResponse(response, request)
```

</div><div class="api-docs__section">

#### Description

</div><div class="api-docs__description"><span class="api-docs__do-not-parse">

Private helper to run async response processing

</span></div><p class="api-docs__definition">

Defined in [client/client.ts:327](https://github.com/BetterTyped/hyper-fetch/blob/c44d728f/packages/core/src/client/client.ts#L327)

</p><div class="api-docs__section">

#### Parameters

</div><div class="api-docs__parameters"><table><thead><tr><th>Name</th><th>Details</th></tr></thead><tbody><tr param-data="response"><td class="api-docs__param-name required">

#### response 

`Required`

</td><td class="api-docs__param-type">

`ResponseReturnType<any, GlobalErrorType, AdapterType>`

</td></tr><tr param-data="request"><td class="api-docs__param-name required">

#### request 

`Required`

</td><td class="api-docs__param-type">

`RequestInstance`

</td></tr></tbody></table></div><div class="api-docs__section">

#### Return

</div><div class="api-docs__returns">

```ts
Promise<ResponseReturnType<any, GlobalErrorType, AdapterType>>
```

</div><hr/></div><div class="api-docs__method" method-data="__modifySuccessResponse"><h3 class="api-docs__name">

### `__modifySuccessResponse()`

</h3><div class="api-docs__section">

#### Preview

</div><div class="api-docs__preview fn">

```ts
__modifySuccessResponse(response, request)
```

</div><div class="api-docs__section">

#### Description

</div><div class="api-docs__description"><span class="api-docs__do-not-parse">

Private helper to run async on-success response processing

</span></div><p class="api-docs__definition">

Defined in [client/client.ts:319](https://github.com/BetterTyped/hyper-fetch/blob/c44d728f/packages/core/src/client/client.ts#L319)

</p><div class="api-docs__section">

#### Parameters

</div><div class="api-docs__parameters"><table><thead><tr><th>Name</th><th>Details</th></tr></thead><tbody><tr param-data="response"><td class="api-docs__param-name required">

#### response 

`Required`

</td><td class="api-docs__param-type">

`ResponseReturnType<any, GlobalErrorType, AdapterType>`

</td></tr><tr param-data="request"><td class="api-docs__param-name required">

#### request 

`Required`

</td><td class="api-docs__param-type">

`RequestInstance`

</td></tr></tbody></table></div><div class="api-docs__section">

#### Return

</div><div class="api-docs__returns">

```ts
Promise<ResponseReturnType<any, GlobalErrorType, AdapterType>>
```

</div><hr/></div></div>