Interface: HTTPBaseHandlerOptions<TRouter, TRequest>
Defined in: packages/server/src/unstable-core-do-not-import/http/types.ts:48
Base interface for anything using HTTP
Extends
BaseHandlerOptions<TRouter,TRequest>
Type Parameters
| Type Parameter |
|---|
TRouter extends AnyTRPCRouter |
TRequest |
Properties
allowBatching?
optionalallowBatching:boolean
Defined in: packages/server/src/unstable-core-do-not-import/http/types.ts:160
Allow request batching
Default
tstrue
tstrue
Inherited from
BaseHandlerOptions.allowBatching
allowMethodOverride?
optionalallowMethodOverride:boolean
Defined in: packages/server/src/unstable-core-do-not-import/http/types.ts:155
Allow method override - will skip the method check
Default
tsfalse
tsfalse
Inherited from
BaseHandlerOptions.allowMethodOverride
batching?
optionalbatching:object
Defined in: packages/server/src/unstable-core-do-not-import/http/types.ts:144
enabled
enabled:
boolean
Default
tstrue
tstrue
Deprecated
use allowBatching instead, this will be removed in v12
Inherited from
BaseHandlerOptions.batching
maxBatchSize?
optionalmaxBatchSize:number
Defined in: packages/server/src/unstable-core-do-not-import/http/types.ts:167
Restrict the maximum size of a batch call, invalid requests will be rejected with a 400 error
Important
Ensure you set the same or lower limit on your client batch link
Default
tsunlimited
tsunlimited
Inherited from
BaseHandlerOptions.maxBatchSize
onError?
optionalonError:HTTPErrorHandler<TRouter,TRequest>
Defined in: packages/server/src/unstable-core-do-not-import/http/types.ts:140
Inherited from
BaseHandlerOptions.onError
responseMeta?
optionalresponseMeta:ResponseMetaFn<TRouter>
Defined in: packages/server/src/unstable-core-do-not-import/http/types.ts:55
Add handler to be called before response is sent to the user Useful for setting cache headers
See
https://trpc.io/docs/v11/caching
router
router:
TRouter
Defined in: packages/server/src/unstable-core-do-not-import/http/types.ts:150
Inherited from
BaseHandlerOptions.router