Skip to main content
Version: 11.x

Type Alias: HTTPBatchStreamLinkOptions<TRoot>

HTTPBatchStreamLinkOptions<TRoot>: HTTPBatchLinkOptions<TRoot> & object

Defined in: packages/client/src/links/httpBatchStreamLink.ts:21

Type declaration

streamHeader?

optional streamHeader: "trpc-accept" | "accept"

Which header to use to signal the server that the client wants a streaming response.

  • 'trpc-accept' (default): sends trpc-accept: application/jsonl header
  • 'accept': sends Accept: application/jsonl header, which can avoid CORS preflight for cross-origin streaming queries. Be aware that application/jsonl is not an official MIME type and so this is not completely spec-compliant - you should test that your infrastructure supports this value.

Default

ts
'trpc-accept'
ts
'trpc-accept'

Type Parameters

Type Parameter
TRoot extends AnyClientTypes