コード例 #1
0
 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));
 }
コード例 #2
0
 private static string CrackStatusTextFromResponse(HttpResponse response)
 {
     var match = Regex.Match(response.Content, "<Status>(.*?)</Status>");
     return match.Groups[1].Value;
 }