Making HTTP request and receiving multipart/x-mixed-replace response in Node.js
问题 I need to make a HTTP GET request to foreign server to start receiving events. After request I immediately get multipart/x-mixed-replace response. When an event occurs, it's sent as XML message together with boundary indicating the end of this part. Now I must implement it in Node.js. With normal request I use node-rest-client , call its get() method and put my logic in method's callback. Trouble is that callback is executed only when response is finished and with multipart/x-mixed-replace it