Next.js Discord

Discord Forum

rest api headers global config

Unanswered
MarkMiklos posted this in #help-forum
Open in Discord
I have an application, that calls a rest api, and I have to send Tenant-Id and the Language in the headers each time a fetch call is made, i have a dynamic route with the tenants subtype, what would be the best solution to store this data, and access it in a fetch wrapper?

I need this fetch to be accessible in server and client side also.

Or do i have to go with a serverApi and a clientApi directive and make a server and client specific?

1 Reply

🅱️