'During an ongoing http connection where data is being transmitted, how can data be requested and recieved
I have set up a express server with 2 endpoints. One of these endpoints never closes the http connection as it uses the http header 'transfer-encoding: chunked' and I am constantly using '''res.write''' to send data through this endpoint every few seconds.
On the client side however when I attempt to make a fetch request from this endpoint, the response doesn't show as it is waiting for the request to finish.
Would it be possible to actually receiving this changing data on the client side, instead of it waiting to complete the request?
Any help is greatly appreciated
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|