Welcome Guest, Not a member yet? Register   Sign In
How to implement EventSource on Codeignigter app?

(02-26-2020, 03:57 PM)SmokeyCharizard Wrote: [So after more experimentation, I found that the form data will POST to the controller via fetch if I remove the header, but the progress messages that echo during the process aren't fired until the process is done. The strange thing is that I even flush() inside the process, and the messages are sent as a response to my fetch request. 

I hardcoded the values I'm trying to pass, and I got the regular progress messages to eventsource throughout the process (instead of until it was done). Something about POSTing this data without a header prevents these messages from sending...

The problem is that Fetch captures the progress messages. By its nature, the Fetch promise won't actually return anything until it is resolved. In short, EventSource is "flushing" the messages but Fetch is hoarding them.

The only thing this has to do with POST is that Fetch is the POSTer.

I've been experimenting and have not found an answer yet. I'm not sure there is one. There are responsibilities calling so I'm not sure when I'll have time to play with this again.

Messages In This Thread
RE: How to implement EventSource on Codeignigter app? - by dave friend - 02-26-2020, 04:49 PM

Theme © iAndrew 2016 - Forum software by © MyBB