fetch external api
Unanswered
Torymid wasp posted this in #help-forum
Torymid waspOP
i have a same issue with https://stackoverflow.com/questions/78547999/need-advice-on-next-js-14-and-external-api-fetch-logic
help
im using static exports hence i cant use rewrites
https://example/apiRoute became /apiRoute of the internal urlhelp
const response = await fetch('https://my-api.something/route', { //became requesting to localhost:3000/route
headers: {
'authorization': `Bearer ${apiKey}`,
'Content-Type': 'application/json; charset=utf8'
},
});im using static exports hence i cant use rewrites