NEXT edge api routes: sending a json response
I'm currently migrating my app to work with edge
worked fine so far until i tried to return json to the frontend, then the frontend was complaining with
I just followed the examples from nextjs guide (pages router in particular), but it seems this isn't the right way to send json to the frontend, how should i do it?
edge runtime code:
It's erroring out on this part in particular(on the frontend):
worked fine so far until i tried to return json to the frontend, then the frontend was complaining with
SyntaxError: Unexpected end of JSON inputI just followed the examples from nextjs guide (pages router in particular), but it seems this isn't the right way to send json to the frontend, how should i do it?
edge runtime code:
It's erroring out on this part in particular(on the frontend):
