Send post data while opening SSE connection
Posted
by
Prosto Trader
on Stack Overflow
See other posts from Stack Overflow
or by Prosto Trader
Published on 2014-06-12T11:47:13Z
Indexed on
2014/06/12
15:25 UTC
Read the original article
Hit count: 220
I'm trying to establish SSE connection and do some long-taking actions on server-side, informing user about how it goes through SSE events.
Actually, I don't understand how would I send some data along with new connection. I have to combine regular ajax with new EventSource or there is a way to transfer post data inside that event?
Here is what I have so far, and I need to send pretty big JSON with the request. Is it possible or the only way to send data is GET?
var source = new EventSource('/terminal/ajax-put-packet-trade-order/');
© Stack Overflow or respective owner