To reuse a HTTP connection you need to use a HTTP/1.1 server and I suspect you need to make the GET specify this.
You first loop needs to read until the end of the result, not the end of the stream because once the connection is closed you can't reuse it.