Hi!
Is there support in Nim for a network stream, or continuously recv'ing from a socket? When I tried connecting to https in the more low level way, I couldn't get it to work.
Here is a bare-bones example:
https://play.nim-lang.org/#ix=3OVf
(It receives empty lines...)
Am I missing something? how to enable streaming support, if there is any.
https://play.nim-lang.org/#ix=3OVI
This works when tested locally (Nim playground doesn't do -d:ssl).
There were a few issues - lichess' web server supports HTTP 1.1, not 2.0. You were also sending a malformed HTTP request so the server responded with an error. You were printing empty lines because that's what the socket kept returning - you should instead break on that.