implement http_client using curl