Esempio n. 1
0
 public ActionResult Create([FromBody] string podName)
 {
     if (string.IsNullOrEmpty(podName))
     {
         return(BadRequest("PodName is null or empty"));
     }
     try
     {
         _client.AddServicePod(podName);
     }
     catch (HttpOperationException httpEx)
     {
         return(BadRequest(httpEx.Response.Content));
     }
     catch (Exception ex)
     {
         return(BadRequest(ex));
     }
     return(Ok());
 }