T
tRPC

Read response headers on the client

Read response headers on the client

Aaludv6/6/2023
Ive been searching for a while trying to figure out how to access response headers on the client. Found this Github issue, but it has no responses (https://github.com/trpc/trpc/discussions/3866). Anyone got an example of how to read the response headers on the client?
Solution:
This seems to be working. but not sure if I break some magic sauce by doing it..
Jump to solution
Solution
Aaludv6/6/2023
This seems to be working. but not sure if I break some magic sauce by doing it..
Nnlucas6/6/2023
That looks fine, it’s there to be used, though in general using headers may be a sign of trying to bend tRPC into being a REST tool

Looking for more? Join the community!

T
tRPC

Read response headers on the client

Join Server