Replies: 2 comments
-
just call |
Beta Was this translation helpful? Give feedback.
0 replies
-
yep, calling import { headers } from "next/headers";
...
fetch(url, {
headers: await headers()
} is working. I just thought |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Provide environment information
N/A
Describe the bug
A common use case, is to call an
api route
, after atrpc
complete, for example to send an email.API route
is usually protected withBecause
request
headers are not available in thetrpc
procedure, i'm unable to forward them to thefetch
call. Is there a better way around it.USE case
Another solution will be to send this into a
redis
queue, and process these ops later. But that's not the point. I would like to makeapi
calls fromtrpc
procedure. This is just a simplified use case.Link to reproduction
https://github.com/t3-oss/create-t3-turbo
To reproduce
N/A
Additional information
N/A
Beta Was this translation helpful? Give feedback.
All reactions