private static void ThrowUnexpectedHttpResponse(HttpResponse response) { OurTrace.TraceVerbose("Throwing UnhandledHttpException: " + response.StatusCode + ", with content: " + response.Content); throw new UnhandledHttpException( string.Format("Unexpected Http Response! HttpStatusCode = {0}, Response = {1}", response.StatusCode, response.Content)); }
private static string CrackStatusTextFromResponse(HttpResponse response) { var match = Regex.Match(response.Content, "<Status>(.*?)</Status>"); return match.Groups[1].Value; }