

# Request

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

---

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

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

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

## Description

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

Fetch request it is designed to prepare the necessary setup to execute the request to the server.
We can set up basic options for example endpoint, method, headers and advanced settings like cache, invalidation patterns, concurrency, retries and much, much more.
:::info Usage
We should not use this class directly in the standard development flow. We can initialize it using the 
`createRequest`
 method on the **Client** class.
:::

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

Defined in [request/request.ts:40](https://github.com/BetterTyped/hyper-fetch/blob/c44d728f/packages/core/src/request/request.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="client"><td class="api-docs__param-name required">

### client 

`Required`

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

`Client<GlobalError, AdapterType>`

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

### requestOptions 

`Required`

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

`RequestOptionsType<Endpoint, ExtractAdapterOptions<AdapterType>, ExtractAdapterMethodType<AdapterType>>`

</td></tr><tr param-data="requestJSON"><td class="api-docs__param-name optional">

### requestJSON 

`Optional`

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

`RequestCurrentType<Payload, QueryParams, Endpoint, ExtractAdapterOptions<AdapterType>, ExtractAdapterMethodType<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="abortKey"><h3 class="api-docs__name">

### `abortKey`

</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 [request/request.ts:68](https://github.com/BetterTyped/hyper-fetch/blob/c44d728f/packages/core/src/request/request.ts#L68)

</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="auth"><h3 class="api-docs__name">

### `auth`

</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 [request/request.ts:54](https://github.com/BetterTyped/hyper-fetch/blob/c44d728f/packages/core/src/request/request.ts#L54)

</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="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 [request/request.ts:64](https://github.com/BetterTyped/hyper-fetch/blob/c44d728f/packages/core/src/request/request.ts#L64)

</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="cacheKey"><h3 class="api-docs__name">

### `cacheKey`

</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 [request/request.ts:69](https://github.com/BetterTyped/hyper-fetch/blob/c44d728f/packages/core/src/request/request.ts#L69)

</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="cacheTime"><h3 class="api-docs__name">

### `cacheTime`

</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 [request/request.ts:65](https://github.com/BetterTyped/hyper-fetch/blob/c44d728f/packages/core/src/request/request.ts#L65)

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

#### Type

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

```ts
number
```

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

### `cancelable`

</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 [request/request.ts:60](https://github.com/BetterTyped/hyper-fetch/blob/c44d728f/packages/core/src/request/request.ts#L60)

</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="client"><h3 class="api-docs__name">

### `client`

</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 [request/request.ts:93](https://github.com/BetterTyped/hyper-fetch/blob/c44d728f/packages/core/src/request/request.ts#L93)

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

#### Type

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

```ts
Client<GlobalError, AdapterType>
```

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

### `data`

</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 [request/request.ts:57](https://github.com/BetterTyped/hyper-fetch/blob/c44d728f/packages/core/src/request/request.ts#L57)

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

#### Type

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

```ts
Payload
```

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

### `deduplicate`

</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 [request/request.ts:73](https://github.com/BetterTyped/hyper-fetch/blob/c44d728f/packages/core/src/request/request.ts#L73)

</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="deduplicateTime"><h3 class="api-docs__name">

### `deduplicateTime`

</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 [request/request.ts:74](https://github.com/BetterTyped/hyper-fetch/blob/c44d728f/packages/core/src/request/request.ts#L74)

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

#### Type

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

```ts
number
```

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

### `effectKey`

</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 [request/request.ts:71](https://github.com/BetterTyped/hyper-fetch/blob/c44d728f/packages/core/src/request/request.ts#L71)

</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="endpoint"><h3 class="api-docs__name">

### `endpoint`

</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 [request/request.ts:52](https://github.com/BetterTyped/hyper-fetch/blob/c44d728f/packages/core/src/request/request.ts#L52)

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

#### Type

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

```ts
Endpoint
```

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

### `garbageCollection`

</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 [request/request.ts:63](https://github.com/BetterTyped/hyper-fetch/blob/c44d728f/packages/core/src/request/request.ts#L63)

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

#### Type

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

```ts
number
```

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

### `headers`

</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 [request/request.ts:53](https://github.com/BetterTyped/hyper-fetch/blob/c44d728f/packages/core/src/request/request.ts#L53)

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

#### Type

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

```ts
HeadersInit
```

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

### `method`

</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 [request/request.ts:55](https://github.com/BetterTyped/hyper-fetch/blob/c44d728f/packages/core/src/request/request.ts#L55)

</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="mock"><h3 class="api-docs__name">

### `mock`

</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 [request/request.ts:76](https://github.com/BetterTyped/hyper-fetch/blob/c44d728f/packages/core/src/request/request.ts#L76)

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

#### Type

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

```ts
Generator<GeneratorReturnMockTypes<Response, Request<Response, Payload, QueryParams, GlobalError, LocalError, Endpoint, AdapterType, HasData, HasParams, HasQuery>>, GeneratorReturnMockTypes<Response, Request<Response, Payload, QueryParams, GlobalError, LocalError, Endpoint, AdapterType, HasData, HasParams, HasQuery>>, GeneratorReturnMockTypes<Response, Request<Response, Payload, QueryParams, GlobalError, LocalError, Endpoint, AdapterType, HasData, HasParams, HasQuery>>>
```

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

### `mockData`

</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 [request/request.ts:81](https://github.com/BetterTyped/hyper-fetch/blob/c44d728f/packages/core/src/request/request.ts#L81)

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

#### Type

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

```ts
RequestDataMockTypes<Response, Request<Response, Payload, QueryParams, GlobalError, LocalError, Endpoint, AdapterType, HasData, HasParams, HasQuery>>
```

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

### `offline`

</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 [request/request.ts:67](https://github.com/BetterTyped/hyper-fetch/blob/c44d728f/packages/core/src/request/request.ts#L67)

</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="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 [request/request.ts:59](https://github.com/BetterTyped/hyper-fetch/blob/c44d728f/packages/core/src/request/request.ts#L59)

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

#### Type

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

```ts
ExtractAdapterOptions<AdapterType>
```

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

### `params`

</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 [request/request.ts:56](https://github.com/BetterTyped/hyper-fetch/blob/c44d728f/packages/core/src/request/request.ts#L56)

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

#### Type

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

```ts
ExtractRouteParams<Endpoint>
```

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

### `queryParams`

</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 [request/request.ts:58](https://github.com/BetterTyped/hyper-fetch/blob/c44d728f/packages/core/src/request/request.ts#L58)

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

#### Type

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

```ts
QueryParams
```

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

### `queueKey`

</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 [request/request.ts:70](https://github.com/BetterTyped/hyper-fetch/blob/c44d728f/packages/core/src/request/request.ts#L70)

</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="queued"><h3 class="api-docs__name">

### `queued`

</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 [request/request.ts:66](https://github.com/BetterTyped/hyper-fetch/blob/c44d728f/packages/core/src/request/request.ts#L66)

</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="requestJSON"><h3 class="api-docs__name">

### `requestJSON`

</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 [request/request.ts:99](https://github.com/BetterTyped/hyper-fetch/blob/c44d728f/packages/core/src/request/request.ts#L99)

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

#### Type

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

```ts
RequestCurrentType<Payload, QueryParams, Endpoint, ExtractAdapterOptions<AdapterType>, ExtractAdapterMethodType<AdapterType>>
```

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

### `requestOptions`

</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 [request/request.ts:94](https://github.com/BetterTyped/hyper-fetch/blob/c44d728f/packages/core/src/request/request.ts#L94)

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

#### Type

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

```ts
RequestOptionsType<Endpoint, ExtractAdapterOptions<AdapterType>, ExtractAdapterMethodType<AdapterType>>
```

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

### `retry`

</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 [request/request.ts:61](https://github.com/BetterTyped/hyper-fetch/blob/c44d728f/packages/core/src/request/request.ts#L61)

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

#### Type

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

```ts
number
```

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

### `retryTime`

</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 [request/request.ts:62](https://github.com/BetterTyped/hyper-fetch/blob/c44d728f/packages/core/src/request/request.ts#L62)

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

#### Type

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

```ts
number
```

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

### `used`

</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 [request/request.ts:72](https://github.com/BetterTyped/hyper-fetch/blob/c44d728f/packages/core/src/request/request.ts#L72)

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

#### Type

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

```ts
boolean
```

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

## Methods

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

### `dataMapper()`

</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 [request/request.ts:75](https://github.com/BetterTyped/hyper-fetch/blob/c44d728f/packages/core/src/request/request.ts#L75)

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

#### Return

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

```ts
(data: Payload) => NewDataType
```

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

### `exec()`

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

#### Description

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

Method to use the request WITHOUT adding it to cache and queues. This mean it will make simple request without queue side effects.

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

Defined in [request/request.ts:461](https://github.com/BetterTyped/hyper-fetch/blob/c44d728f/packages/core/src/request/request.ts#L461)

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

#### Return

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



```tsx
Promise<[Data | null, Error | null, HttpStatus]>
```



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

### `requestMapper()`

</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 [request/request.ts:82](https://github.com/BetterTyped/hyper-fetch/blob/c44d728f/packages/core/src/request/request.ts#L82)

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

#### Return

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

```ts
(requestId: string, request: RequestInstance) => R
```

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

### `responseMapper()`

</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 [request/request.ts:83](https://github.com/BetterTyped/hyper-fetch/blob/c44d728f/packages/core/src/request/request.ts#L83)

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

#### Return

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

```ts
(response: ResponseReturnType<any, any, any>) => ResponseReturnType<Response, GlobalError | LocalError, AdapterType>
```

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

### `send()`

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

#### Description

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

Method used to perform requests with usage of cache and queues

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

Defined in [request/request.ts:492](https://github.com/BetterTyped/hyper-fetch/blob/c44d728f/packages/core/src/request/request.ts#L492)

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

#### Return

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



```tsx
Promise<[Data | null, Error | null, HttpStatus]>
```



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

### `abort()`

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

#### Preview

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

```ts
abort()
```

</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 [request/request.ts:445](https://github.com/BetterTyped/hyper-fetch/blob/c44d728f/packages/core/src/request/request.ts#L445)

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

#### Return

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

```ts
Request<Response, Payload, QueryParams, GlobalError, LocalError, Endpoint, AdapterType, HasData, HasParams, HasQuery>
```

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

### `clone()`

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

#### Preview

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

```ts
clone<D, P, Q>(options)
```

</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 [request/request.ts:400](https://github.com/BetterTyped/hyper-fetch/blob/c44d728f/packages/core/src/request/request.ts#L400)

</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 optional">

#### options 

`Optional`

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

`RequestCurrentType<Payload, QueryParams, Endpoint, ExtractAdapterOptions<AdapterType>, ExtractAdapterMethodType<AdapterType>>`

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

#### Return

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

```ts
Request<Response, Payload, QueryParams, GlobalError, LocalError, Endpoint, AdapterType, D, P, Q>
```

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

### `removeMock()`

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

#### Preview

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

```ts
removeMock()
```

</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 [request/request.ts:309](https://github.com/BetterTyped/hyper-fetch/blob/c44d728f/packages/core/src/request/request.ts#L309)

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

#### Return

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

```ts
this
```

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

### `setAbortKey()`

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

#### Preview

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

```ts
setAbortKey(abortKey)
```

</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 [request/request.ts:245](https://github.com/BetterTyped/hyper-fetch/blob/c44d728f/packages/core/src/request/request.ts#L245)

</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="abortKey"><td class="api-docs__param-name required">

#### abortKey 

`Required`

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

`string`

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

#### Return

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

```ts
Request<Response, Payload, QueryParams, GlobalError, LocalError, Endpoint, AdapterType, HasData, HasParams, HasQuery>
```

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

### `setAuth()`

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

#### Preview

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

```ts
setAuth(auth)
```

</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 [request/request.ts:165](https://github.com/BetterTyped/hyper-fetch/blob/c44d728f/packages/core/src/request/request.ts#L165)

</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="auth"><td class="api-docs__param-name required">

#### auth 

`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
Request<Response, Payload, QueryParams, GlobalError, LocalError, Endpoint, AdapterType, HasData, HasParams, HasQuery>
```

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

### `setCache()`

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

#### Preview

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

```ts
setCache(cache)
```

</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 [request/request.ts:221](https://github.com/BetterTyped/hyper-fetch/blob/c44d728f/packages/core/src/request/request.ts#L221)

</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="cache"><td class="api-docs__param-name required">

#### cache 

`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
Request<Response, Payload, QueryParams, GlobalError, LocalError, Endpoint, AdapterType, HasData, HasParams, HasQuery>
```

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

### `setCacheKey()`

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

#### Preview

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

```ts
setCacheKey(cacheKey)
```

</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 [request/request.ts:250](https://github.com/BetterTyped/hyper-fetch/blob/c44d728f/packages/core/src/request/request.ts#L250)

</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="cacheKey"><td class="api-docs__param-name required">

#### cacheKey 

`Required`

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

`string`

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

#### Return

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

```ts
Request<Response, Payload, QueryParams, GlobalError, LocalError, Endpoint, AdapterType, HasData, HasParams, HasQuery>
```

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

### `setCacheTime()`

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

#### Preview

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

```ts
setCacheTime(cacheTime)
```

</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 [request/request.ts:231](https://github.com/BetterTyped/hyper-fetch/blob/c44d728f/packages/core/src/request/request.ts#L231)

</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="cacheTime"><td class="api-docs__param-name required">

#### cacheTime 

`Required`

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

`number`

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

#### Return

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

```ts
Request<Response, Payload, QueryParams, GlobalError, LocalError, Endpoint, AdapterType, HasData, HasParams, HasQuery>
```

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

### `setCancelable()`

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

#### Preview

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

```ts
setCancelable(cancelable)
```

</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 [request/request.ts:187](https://github.com/BetterTyped/hyper-fetch/blob/c44d728f/packages/core/src/request/request.ts#L187)

</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="cancelable"><td class="api-docs__param-name required">

#### cancelable 

`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
Request<Response, Payload, QueryParams, GlobalError, LocalError, Endpoint, AdapterType, HasData, HasParams, HasQuery>
```

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

### `setData()`

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

#### Preview

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

```ts
setData<D>(data)
```

</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 [request/request.ts:173](https://github.com/BetterTyped/hyper-fetch/blob/c44d728f/packages/core/src/request/request.ts#L173)

</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="data"><td class="api-docs__param-name required">

#### data 

`Required`

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

`D`

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

#### Return

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

```ts
Request<Response, Payload, QueryParams, GlobalError, LocalError, Endpoint, AdapterType, D extends null ? false : true, HasParams, HasQuery>
```

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

### `setDataMapper()`

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

#### Preview

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

```ts
setDataMapper<DataMapper>(dataMapper)
```

</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 [request/request.ts:281](https://github.com/BetterTyped/hyper-fetch/blob/c44d728f/packages/core/src/request/request.ts#L281)

</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="dataMapper"><td class="api-docs__param-name required">

#### dataMapper 

`Required`

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

`DataMapper`

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

#### Return

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

```ts
Request<Response, Payload, QueryParams, GlobalError, LocalError, Endpoint, AdapterType, HasData, HasParams, HasQuery>
```

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

### `setDeduplicate()`

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

#### Preview

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

```ts
setDeduplicate(deduplicate)
```

</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 [request/request.ts:265](https://github.com/BetterTyped/hyper-fetch/blob/c44d728f/packages/core/src/request/request.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="deduplicate"><td class="api-docs__param-name required">

#### deduplicate 

`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
Request<Response, Payload, QueryParams, GlobalError, LocalError, Endpoint, AdapterType, HasData, HasParams, HasQuery>
```

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

### `setDeduplicateTime()`

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

#### Preview

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

```ts
setDeduplicateTime(deduplicateTime)
```

</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 [request/request.ts:269](https://github.com/BetterTyped/hyper-fetch/blob/c44d728f/packages/core/src/request/request.ts#L269)

</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="deduplicateTime"><td class="api-docs__param-name required">

#### deduplicateTime 

`Required`

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

`number`

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

#### Return

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

```ts
Request<Response, Payload, QueryParams, GlobalError, LocalError, Endpoint, AdapterType, HasData, HasParams, HasQuery>
```

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

### `setEffectKey()`

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

#### Preview

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

```ts
setEffectKey(effectKey)
```

</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 [request/request.ts:260](https://github.com/BetterTyped/hyper-fetch/blob/c44d728f/packages/core/src/request/request.ts#L260)

</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="effectKey"><td class="api-docs__param-name required">

#### effectKey 

`Required`

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

`string`

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

#### Return

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

```ts
Request<Response, Payload, QueryParams, GlobalError, LocalError, Endpoint, AdapterType, HasData, HasParams, HasQuery>
```

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

### `setGarbageCollection()`

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

#### Preview

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

```ts
setGarbageCollection(garbageCollection)
```

</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 [request/request.ts:211](https://github.com/BetterTyped/hyper-fetch/blob/c44d728f/packages/core/src/request/request.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="garbageCollection"><td class="api-docs__param-name required">

#### garbageCollection 

`Required`

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

`number`

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

#### Return

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

```ts
Request<Response, Payload, QueryParams, GlobalError, LocalError, Endpoint, AdapterType, HasData, HasParams, HasQuery>
```

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

### `setHeaders()`

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

#### Preview

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

```ts
setHeaders(headers)
```

</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 [request/request.ts:161](https://github.com/BetterTyped/hyper-fetch/blob/c44d728f/packages/core/src/request/request.ts#L161)

</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="headers"><td class="api-docs__param-name required">

#### headers 

`Required`

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

`HeadersInit`

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

#### Return

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

```ts
Request<Response, Payload, QueryParams, GlobalError, LocalError, Endpoint, AdapterType, HasData, HasParams, HasQuery>
```

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

### `setMock()`

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

#### Preview

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

```ts
setMock(mockData)
```

</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 [request/request.ts:289](https://github.com/BetterTyped/hyper-fetch/blob/c44d728f/packages/core/src/request/request.ts#L289)

</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="mockData"><td class="api-docs__param-name required">

#### mockData 

`Required`

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

`RequestDataMockTypes<Response, this>`

</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="setOffline"><h3 class="api-docs__name">

### `setOffline()`

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

#### Preview

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

```ts
setOffline(offline)
```

</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 [request/request.ts:277](https://github.com/BetterTyped/hyper-fetch/blob/c44d728f/packages/core/src/request/request.ts#L277)

</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="offline"><td class="api-docs__param-name required">

#### offline 

`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
Request<Response, Payload, QueryParams, GlobalError, LocalError, Endpoint, AdapterType, HasData, HasParams, HasQuery>
```

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

### `setOptions()`

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

#### Preview

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

```ts
setOptions(options)
```

</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 [request/request.ts:183](https://github.com/BetterTyped/hyper-fetch/blob/c44d728f/packages/core/src/request/request.ts#L183)

</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">

`ExtractAdapterOptions<AdapterType>`

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

#### Return

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

```ts
Request<Response, Payload, QueryParams, GlobalError, LocalError, Endpoint, AdapterType, HasData, HasParams, true>
```

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

### `setParams()`

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

#### Preview

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

```ts
setParams<P>(params)
```

</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 [request/request.ts:169](https://github.com/BetterTyped/hyper-fetch/blob/c44d728f/packages/core/src/request/request.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="params"><td class="api-docs__param-name required">

#### params 

`Required`

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

`P`

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

#### Return

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

```ts
Request<Response, Payload, QueryParams, GlobalError, LocalError, Endpoint, AdapterType, HasData, P extends null ? false : true, HasQuery>
```

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

### `setQueryParams()`

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

#### Preview

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

```ts
setQueryParams(queryParams)
```

</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 [request/request.ts:179](https://github.com/BetterTyped/hyper-fetch/blob/c44d728f/packages/core/src/request/request.ts#L179)

</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="queryParams"><td class="api-docs__param-name required">

#### queryParams 

`Required`

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

`QueryParams`

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

#### Return

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

```ts
Request<Response, Payload, QueryParams, GlobalError, LocalError, Endpoint, AdapterType, HasData, HasParams, true>
```

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

### `setQueueKey()`

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

#### Preview

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

```ts
setQueueKey(queueKey)
```

</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 [request/request.ts:255](https://github.com/BetterTyped/hyper-fetch/blob/c44d728f/packages/core/src/request/request.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="queueKey"><td class="api-docs__param-name required">

#### queueKey 

`Required`

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

`string`

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

#### Return

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

```ts
Request<Response, Payload, QueryParams, GlobalError, LocalError, Endpoint, AdapterType, HasData, HasParams, HasQuery>
```

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

### `setQueued()`

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

#### Preview

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

```ts
setQueued(queued)
```

</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 [request/request.ts:241](https://github.com/BetterTyped/hyper-fetch/blob/c44d728f/packages/core/src/request/request.ts#L241)

</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="queued"><td class="api-docs__param-name required">

#### queued 

`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
Request<Response, Payload, QueryParams, GlobalError, LocalError, Endpoint, AdapterType, HasData, HasParams, HasQuery>
```

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

### `setRequestMapper()`

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

#### Preview

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

```ts
setRequestMapper(requestMapper)
```

</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 [request/request.ts:315](https://github.com/BetterTyped/hyper-fetch/blob/c44d728f/packages/core/src/request/request.ts#L315)

</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="requestMapper"><td class="api-docs__param-name required">

#### requestMapper 

`Required`

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

`<R>(requestId: string, request: this) => R`

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

#### Return

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

```ts
Request<Response, Payload, QueryParams, GlobalError, LocalError, Endpoint, AdapterType, HasData, HasParams, HasQuery>
```

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

### `setResponseMapper()`

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

#### Preview

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

```ts
setResponseMapper<NewResponse, NewError>(responseMapper)
```

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

#### Description

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

Map

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

Defined in [request/request.ts:329](https://github.com/BetterTyped/hyper-fetch/blob/c44d728f/packages/core/src/request/request.ts#L329)

</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="responseMapper"><td class="api-docs__param-name optional">

#### responseMapper 

`Optional`

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

`(response: ResponseReturnType<Response, GlobalError | LocalError, AdapterType>) => ResponseReturnType<NewResponse, NewError, AdapterType>`

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

#### Return

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

```ts
Request<NewResponse, Payload, QueryParams, GlobalError, LocalError, Endpoint, AdapterType, HasData, HasParams, HasQuery>
```

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

### `setRetry()`

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

#### Preview

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

```ts
setRetry(retry)
```

</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 [request/request.ts:191](https://github.com/BetterTyped/hyper-fetch/blob/c44d728f/packages/core/src/request/request.ts#L191)

</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="retry"><td class="api-docs__param-name required">

#### retry 

`Required`

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

`number`

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

#### Return

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

```ts
Request<Response, Payload, QueryParams, GlobalError, LocalError, Endpoint, AdapterType, HasData, HasParams, HasQuery>
```

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

### `setRetryTime()`

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

#### Preview

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

```ts
setRetryTime(retryTime)
```

</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 [request/request.ts:201](https://github.com/BetterTyped/hyper-fetch/blob/c44d728f/packages/core/src/request/request.ts#L201)

</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="retryTime"><td class="api-docs__param-name required">

#### retryTime 

`Required`

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

`number`

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

#### Return

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

```ts
Request<Response, Payload, QueryParams, GlobalError, LocalError, Endpoint, AdapterType, HasData, HasParams, HasQuery>
```

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

### `setUsed()`

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

#### Preview

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

```ts
setUsed(used)
```

</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 [request/request.ts:273](https://github.com/BetterTyped/hyper-fetch/blob/c44d728f/packages/core/src/request/request.ts#L273)

</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="used"><td class="api-docs__param-name required">

#### used 

`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
Request<Response, Payload, QueryParams, GlobalError, LocalError, Endpoint, AdapterType, HasData, HasParams, HasQuery>
```

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

### `toJSON()`

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

#### Preview

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

```ts
toJSON()
```

</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 [request/request.ts:365](https://github.com/BetterTyped/hyper-fetch/blob/c44d728f/packages/core/src/request/request.ts#L365)

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

#### Return

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

```ts
{
  abortKey: string;
  auth: boolean;
  cache: boolean;
  cacheKey: string;
  cacheTime: number;
  cancelable: boolean;
  data: Payload | \null\ | \undefined\;
  deduplicate: boolean;
  deduplicateTime: number;
  disableRequestInterceptors: boolean | undefined;
  disableResponseInterceptors: boolean | undefined;
  effectKey: string;
  endpoint: string;
  garbageCollection: number;
  headers: HeadersInit;
  method: T extends BaseAdapterType<any, infer M, any, any, any> ? M : never;
  offline: boolean;
  options: AdapterOptions | T extends BaseAdapterType<infer O, any, any, any, any> ? O : never;
  params: Params | \null\ | \undefined\;
  queryParams: QueryParams | \null\ | \undefined\;
  queueKey: string;
  queued: boolean;
  requestOptions: {
    abortKey: string;
    auth: boolean;
    cache: boolean;
    cacheKey: string;
    cacheTime: number;
    cancelable: boolean;
    deduplicate: boolean;
    deduplicateTime: number;
    disableRequestInterceptors: boolean;
    disableResponseInterceptors: boolean;
    effectKey: string;
    endpoint: GenericEndpoint;
    garbageCollection: number;
    headers: HeadersInit;
    method: RequestMethods;
    offline: boolean;
    options: AdapterOptions;
    queueKey: string;
    queued: boolean;
    retry: number;
    retryTime: number;
  };
  retry: number;
  retryTime: number;
  updatedAbortKey: boolean;
  updatedCacheKey: boolean;
  updatedEffectKey: boolean;
  updatedQueueKey: boolean;
  used: boolean;
}
```

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