Include a Host header in http_client
Result codes to indicate the outcome of socket reads and writes

Following the read(2)/write(2) convention lead to tangled error-prone
code.