http_client should exit on connection errors
And printf format attributes to error_* declarations