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

(02-25-2020, 04:55 PM)dave friend Wrote:
(02-25-2020, 03:58 PM)SmokeyCharizard Wrote: Encase you can't see my message again, here's the pastebin. https://pastebin.com/eupHEA0c

I can see your PM.
I cannot send a reply to you.
Go the the edit options of your profile and check the box next to Receive private messages from other users.
Just did
Reply
#32

(02-25-2020, 04:55 PM)dave friend Wrote:
(02-25-2020, 03:58 PM)SmokeyCharizard Wrote: Encase you can't see my message again, here's the pastebin. https://pastebin.com/eupHEA0c

I can see your PM.
I cannot send a reply to you.
Go the the edit options of your profile and check the box next to Receive private messages from other users.
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...
Reply
#33

(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.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB