behaved
behaved
TtRPC
Created by behaved on 2/25/2025 in #❓-help
operation input is formdata but trpc makes it an application/json POST call
operation:
{
"type": "mutation",
"path": "vectleProfiles.updateProfileLogo",
"input": {},
"context": {},
"id": 4
}
{
"type": "mutation",
"path": "vectleProfiles.updateProfileLogo",
"input": {},
"context": {},
"id": 4
}
request headers:
accept:
*/*
accept-encoding:
gzip, deflate, br, zstd
accept-language:
en-US,en;q=0.9
connection:
keep-alive
content-length:
11
content-type:
application/json
accept:
*/*
accept-encoding:
gzip, deflate, br, zstd
accept-language:
en-US,en;q=0.9
connection:
keep-alive
content-length:
11
content-type:
application/json
sample router
publicProcedure
.input(z.instanceof(FormData))
.mutation(async ({ input, ctx }) => {
...
}),
publicProcedure
.input(z.instanceof(FormData))
.mutation(async ({ input, ctx }) => {
...
}),
5 replies