Torso of http_client
Improved (more robust) dns_lookup