Next.js Discord

Discord Forum

You can't customizer server action fetches and add keepalive: true

Unanswered
Somali posted this in #help-forum
Open in Discord
SomaliOP
I've looked through the docs and I can't find a way to modify the fetch that server actions do. Right now I have an action run when page closes and I need it to have keepalive: true on the fetch to make sure it finished the call. I tested it out and I could get it to work with fetch and my own route.ts. I just wish there was a way to do it on server action.

0 Replies