Replacing the XmlDocument with XDocument and HttpRequest.GetRespose with the async methods should do the trick