public HttpResponseMessage Setup(Commands.SetupCommand setupCommand) { try { Storage.Console.Setup(setupCommand); return(Request?.CreateResponse(HttpStatusCode.OK, "setup successfull")); } catch (Exception ex) { return(Request.CreateResponse(HttpStatusCode.BadRequest, ex.Message)); } }
private static void Setup(Commands.SetupCommand setupCommand) { var response = _client.PostAsJsonAsync("api/setup", setupCommand).Result; response.EnsureSuccessStatusCode(); }