Non JSON Content Types

Handle FormData, file uploads, Blob, Uint8Array, and ReadableStream inputs in tRPC mutations. Use octetInputParser from @trpc/server/http for binary data. Route non-JSON requests with splitLink and isNonJsonSerializable() from @trpc/client. FormData and binary inputs only work with mutations (POST).

trpc 1f46d7e 6.1 KB Updated

File contents

trpc/trpc/tree/main/packages/server/skills/non-json-content-types commit 1f46d7e4f5

Frequently asked questions

npx skillmds add trpc/non-json-content-types