OtterSwims996
Explore posts from serversdoes anyone know how put vs post calls map to the trpc procedures provided? (query vs mutation)
I did check out the documentation but i only mentions GET and POST, not PUT .
https://trpc.io/docs/rpc
GET -> QUERY
POST -> MUTATE
PUT -> MUTATE ?
The reason I'm asking is because i have to create some put, post and get endpoints that were specified in a codebase but now i need to map them to trpc complements.
My best guess is that both POST and PUT calls send the payload in the request body, but GET calls send the payload in the url parameters. Since the query method lets you send information through the request body, i'm thinking i'll just use mutate call to replace the put functionality
Open to thoughts from the community on this
5 replies
TTCTheo's Typesafe Cult
•Created by OtterSwims996 on 1/17/2024 in #questions
Unable to set up a client side subscription to a trpc route that supports websockets
13 replies