Example #1
0
 static async Task doDELETE(OpsWorksServer serverObj)
 {
     string json = Newtonsoft.Json.JsonConvert.SerializeObject(serverObj);
     WebClient web = new WebClient();
     //web.UploadString("http://safeweb-wf1/OpsWorksApi/api/SessionHost?serverObj=" + json, "DELETE", json);
     web.UploadString("http://safeweb-wf1/OpsWorksApiDev/api/SessionHost?serverObj=" + json, "DELETE", json);
 }
Example #2
0
 static void Main(string[] args)
 {
     Console.WriteLine("Creating web service client");
     OpsWorksServer server = new OpsWorksServer();
     server.Name = Environment.GetEnvironmentVariable("COMPUTERNAME");
     server.InstanceId = getInstanceId();
     Console.WriteLine("attempting to call DELETE method.  params:  NAME: " + server.Name + " id: " + server.InstanceId);
     doDELETE(server);
     Console.WriteLine("Complete");
 }