A little trickier than I first thought. In all articles I've been able to find so far, the same socket is used for efficiency, and would explain the 'Closed' error after each chunk that was seen. It appears that it needs to be understood what the server API requirements are for your specific "https ://someapi.com" domain to terminate as so desired. Would it be possible to supply that web service link for others to tackle perhaps?
'As for disabling chunked encoding, to do that, you must provide the content length via HttpServletResponse.setContentLength(long), before you access the HttpServletResponse.getOutputStream() and HttpServletResponse.getWriter().' https://www.eclipse.org/lists/jetty-users/msg03053.html
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
A little trickier than I first thought. In all articles I've been able to find so far, the same socket is used for efficiency, and would explain the 'Closed' error after each chunk that was seen. It appears that it needs to be understood what the server API requirements are for your specific "https ://someapi.com" domain to terminate as so desired. Would it be possible to supply that web service link for others to tackle perhaps?