# Interface: HTTPBaseHandlerOptions<TRouter, TRequest>

> 

Defined in: [packages/server/src/unstable-core-do-not-import/http/types.ts:59](https://github.com/trpc/trpc/blob/7c907acfd8b31929214792e3b8c2ad7a8ac72563/packages/server/src/unstable-core-do-not-import/http/types.ts#L59)

The options every HTTP adapter takes.

## Extends

- `BaseHandlerOptions`\<`TRouter`, `TRequest`\>

## Type Parameters

| Type Parameter |
| ------ |
| `TRouter` *extends* [`AnyTRPCRouter`](https://trpc.io/docs/typedoc/server/index/type-aliases/AnyTRPCRouter.md) |
| `TRequest` |

## Properties

### allowBatching?

> `optional` **allowBatching**: `boolean`

Defined in: [packages/server/src/unstable-core-do-not-import/http/types.ts:192](https://github.com/trpc/trpc/blob/7c907acfd8b31929214792e3b8c2ad7a8ac72563/packages/server/src/unstable-core-do-not-import/http/types.ts#L192)

Whether clients can batch calls into one request.

#### See

https://trpc.io/docs/client/links/httpBatchLink#disabling-request-batching

#### Default

```ts
true
```

#### Inherited from

`BaseHandlerOptions.allowBatching`

***

### allowMethodOverride?

> `optional` **allowMethodOverride**: `boolean`

Defined in: [packages/server/src/unstable-core-do-not-import/http/types.ts:186](https://github.com/trpc/trpc/blob/7c907acfd8b31929214792e3b8c2ad7a8ac72563/packages/server/src/unstable-core-do-not-import/http/types.ts#L186)

Lets clients call queries and subscriptions with POST as well as GET.
Mutations always use POST.

#### See

https://trpc.io/docs/rpc#overriding-the-default-http-method

#### Default

```ts
false
```

#### Inherited from

`BaseHandlerOptions.allowMethodOverride`

***

### ~~batching?~~

> `optional` **batching**: `object`

Defined in: [packages/server/src/unstable-core-do-not-import/http/types.ts:172](https://github.com/trpc/trpc/blob/7c907acfd8b31929214792e3b8c2ad7a8ac72563/packages/server/src/unstable-core-do-not-import/http/types.ts#L172)

#### ~~enabled~~

> **enabled**: `boolean`

##### Default

```ts
true
```

#### Deprecated

Use `allowBatching` instead. This will be removed in v12.

#### Inherited from

`BaseHandlerOptions.batching`

***

### maxBatchSize?

> `optional` **maxBatchSize**: `number`

Defined in: [packages/server/src/unstable-core-do-not-import/http/types.ts:199](https://github.com/trpc/trpc/blob/7c907acfd8b31929214792e3b8c2ad7a8ac72563/packages/server/src/unstable-core-do-not-import/http/types.ts#L199)

The most calls a batch can have. Larger batches get a 400 error. Set
the client's `maxItems` to the same or a lower number.

#### See

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

#### Default

```ts
unlimited
```

#### Inherited from

`BaseHandlerOptions.maxBatchSize`

***

### onError?

> `optional` **onError**: `HTTPErrorHandler`\<`TRouter`, `TRequest`\>

Defined in: [packages/server/src/unstable-core-do-not-import/http/types.ts:168](https://github.com/trpc/trpc/blob/7c907acfd8b31929214792e3b8c2ad7a8ac72563/packages/server/src/unstable-core-do-not-import/http/types.ts#L168)

Called with each error a procedure throws, for example to log it.

#### See

https://trpc.io/docs/server/error-handling#handling-errors

#### Inherited from

`BaseHandlerOptions.onError`

***

### responseMeta?

> `optional` **responseMeta**: `ResponseMetaFn`\<`TRouter`\>

Defined in: [packages/server/src/unstable-core-do-not-import/http/types.ts:68](https://github.com/trpc/trpc/blob/7c907acfd8b31929214792e3b8c2ad7a8ac72563/packages/server/src/unstable-core-do-not-import/http/types.ts#L68)

Sets the response's status and headers before it's sent, for example
to cache it.

#### See

https://trpc.io/docs/server/caching#using-responsemeta-to-cache-responses

***

### router

> **router**: `TRouter`

Defined in: [packages/server/src/unstable-core-do-not-import/http/types.ts:179](https://github.com/trpc/trpc/blob/7c907acfd8b31929214792e3b8c2ad7a8ac72563/packages/server/src/unstable-core-do-not-import/http/types.ts#L179)

The router to serve.

#### Inherited from

`BaseHandlerOptions.router`
