-1

Is it possible to use server side events for a fresh POST handler? I have a long server side process and would like to return some event updates to the client meanwhile?

Peter Cordes
  • 328,167
  • 45
  • 605
  • 847
Norfeldt
  • 8,272
  • 23
  • 96
  • 152

1 Answers1

0

The quick answer is no, because SSE does not support POST, only GET. (See https://stackoverflow.com/a/34285526/841830)

Darren Cook
  • 27,837
  • 13
  • 117
  • 217
  • Okay, thought it had to be post. But setting up a get handler would not be a problem for me either since I can get the params from the request. Just haven't tried doing SSE and don't know how to go about it in fresh-framework – Norfeldt Jun 17 '23 at 15:37
  • I know that this is not the fresh-framework, but nextjs: this example uses a post to what appears to be a sse response https://youtu.be/mG8UupGkbGo – Norfeldt Jun 17 '23 at 19:13