Next.js Discord

Discord Forum

Are POST request webhooks by default?

Unanswered
Gharial posted this in #help-forum
Open in Discord
GharialOP
If i call an API (ie: /app/api/get-image/route.ts can I navigate around the app still and the POST request in get-image is still processing without interruption?

5 Replies

Barbary Lion
No you cant, the request will kill itself, what you can do is create a web worker this will create a background process.
The definition of a webhook is not a process that runs in the background. A webhook is a route for another API to sent it events to. As a user you dont go directy to a webhook.
GharialOP
thank you!