Merge with http_client.c