Next.js version 14.2.0
I am trying to make an external API call from an API route using the fetch API. I am not interested in the external API response, I just want to fire and forget hence i am not using the await keyword on the fetch call,
export default async function handler(req: NextApiRequest, res: NextApiResponse) { try { fetch('/example-url', { method: 'POST', });
res.status(200).json({ success: true }); } catch (err) { return res.status(err.statusCode || 500).json({ error: err.message || 'Internal Server Error' }); }}
Why does Vercel not make the API call then return a 200?
Note: The above code works on my local
