示例#1
0
 public static T Get <T>(vCloudClient client, string url, int statusCode)
 {
     try
     {
         return(SdkUtil.ValidateResponse <T>(RestUtil.Get(client, url), statusCode));
     }
     catch (Exception ex)
     {
         throw new VCloudException(ex.Message);
     }
 }
示例#2
0
 public static T Put <T>(
     vCloudClient client,
     string url,
     string requestString,
     string mediaType,
     int statusCode)
 {
     try
     {
         return(SdkUtil.ValidateResponse <T>(RestUtil.Put(client, url, requestString, mediaType, "UTF-8"), statusCode));
     }
     catch (Exception ex)
     {
         throw new VCloudException(ex.Message);
     }
 }