Hm, not sure about the link error you're getting (Espruino seems to be finding the error message from the Esp8266 and trying to close the connection).
However I think usually Espruino waits for the server to close the connection rather than counting bytes from content length - it usually sends the Connection: close header. While it does for a normal get I'm not sure if it does when you call request. Maybe you could try adding it?
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.
Hm, not sure about the link error you're getting (Espruino seems to be finding the error message from the Esp8266 and trying to close the connection).
However I think usually Espruino waits for the server to close the connection rather than counting bytes from content length - it usually sends the
Connection: close
header. While it does for a normal get I'm not sure if it does when you call request. Maybe you could try adding it?