I'm using server-sent events in order to execute queries on your database. The server streams the stats in realtime with stats
events and when the query is executed, it sends result
event with the data and closes the connection.
You can test it with this curl command:
curl 'http://rakam-production-webapp-203653584.us-east-1.aws.getrakam.com/query/execute?read_key=l2drg09t1j04poki16q46nsa7qvjdjhsedcml0e9m8sd87h6olkevq8b7m3m6948&data=%7B%22query%22%3A%22SELECT%20*%20FROM%20collection.%5C%22pull_request%5C%22%22%2C%22limit%22%3A1000%7D' -H 'Accept: text/event-stream'
The problem is that is the data is more than a few kilobytes, EventSource doesn't trigger result
event.
http://jsbin.com/jiteca/edit?html,output
It works fine if the data is not that big:
http://jsbin.com/leginu/edit?html,output
I tried Chrome, Safari and Firefox and all of them suffer from this issue. Any idea about how to solve this problem? Is this the limitation of server-sent events, because I didn't find anything on server-sent specification on W3?