DoStorageRequest() public static méthode

public static DoStorageRequest ( string method, Hashtable headers, byte data, string content_type, Uri uri ) : HttpResponse
method string
headers System.Collections.Hashtable
data byte
content_type string
uri System.Uri
Résultat HttpResponse
Exemple #1
0
 public static HttpResponse RetryStorageRequestExpectingServiceAvailable(string method, Hashtable headers, byte[] data, string content_type, Uri uri, int wait_secs, int max_tries, TimeSpan timeout_secs)
 {
     try
     {
         return(GenUtils.Actions.Retry <HttpResponse>(
                    delegate()
         {
             try
             {
                 return StorageUtils.DoStorageRequest(method, headers, data, content_type, uri);
             }
             catch                             // (Exception e)
             {
                 //GenUtils.PriorityLogMsg("exception", "RetryStorageRequest: " + uri, e.Message + e.StackTrace);
                 throw new Exception("RetryStorageRequestException");
             }
         },
                    CompletedIfStatusNotServiceUnavailable,
                    completed_delegate_object: null,
                    wait_secs: wait_secs,
                    max_tries: max_tries,
                    timeout_secs: timeout_secs));
     }
     catch (Exception e)
     {
         GenUtils.LogMsg("exception", "RetryStorageRequest: " + uri, e.Message + e.StackTrace);
         return(new HttpResponse(HttpStatusCode.ServiceUnavailable, uri.ToString(), null, new Dictionary <string, string>()));
     }
 }