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
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Provide environment information
N/A
Describe the bug
A common use case, is to call an
api route, after atrpccomplete, for example to send an email.API routeis usually protected withBecause
requestheaders are not available in thetrpcprocedure, i'm unable to forward them to thefetchcall. Is there a better way around it.USE case
Another solution will be to send this into a
redisqueue, and process these ops later. But that's not the point. I would like to makeapicalls fromtrpcprocedure. 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