# Type Alias: HTTPBatchLinkOptions<TRoot>

> 

> **HTTPBatchLinkOptions**\<`TRoot`\>: `HTTPLinkBaseOptions`\<`TRoot`\> & `object`

Defined in: [packages/client/src/links/HTTPBatchLinkOptions.ts:10](https://github.com/trpc/trpc/blob/7c907acfd8b31929214792e3b8c2ad7a8ac72563/packages/client/src/links/HTTPBatchLinkOptions.ts#L10)

The options of `httpBatchLink`.

## Type declaration

### headers?

> `optional` **headers**: `HTTPHeaders` \| (`opts`) => `HTTPHeaders` \| `Promise`\<`HTTPHeaders`\>

Headers for each request: an object, or a function of the batch's
operations that returns them.

#### See

https://trpc.io/docs/client/headers

### maxItems?

> `optional` **maxItems**: `number`

The most calls one batch can have. Set it to the server's
`maxBatchSize` or lower.

#### See

https://trpc.io/docs/client/links/httpBatchLink#limiting-batch-size

#### Default

```ts
Infinity
```

### maxURLLength?

> `optional` **maxURLLength**: `number`

The longest URL a batched GET request can have. Calls that would
make it longer go in another batch. A call too long on its own
fails.

#### See

https://trpc.io/docs/client/links/httpBatchLink#setting-a-maximum-url-length

#### Default

```ts
Infinity
```

## Type Parameters

| Type Parameter |
| ------ |
| `TRoot` *extends* `AnyClientTypes` |

## See

https://trpc.io/docs/client/links/httpBatchLink#options
