Difference between EventSource and XMLHttpRequest for SSE
问题 I am implementing a Server Send Event application logic. The server side is done and I'm dealing now with the client part. Everywhere I look, the JS is using an EventSource Object, which seems higly logical as it is made for it ! But which has also a lot of limitation (only GET requests, no headers, no data ...) I am asking myself : why not using an XMLHttpRequest Object instead ? The server I am accessing to is written in Java EE and returns a text/event-stream typed response. Here are my