예제 #1
0
        private async Task Reboot(string id)
        {
            WriteLine("Reboot sensor (y/n)? ");
            string input = ReadLine();

            if (input == "y" || input == "Y")
            {
                WriteLine($"Testing POST \"{Route}{Sensors.Route}/{id}/reboot\"");
                try {
                    string response = await Sensors.Reboot(id);

                    WriteLine($"Reboot Sent.\nNetwork response: {response}");
                } catch (Exception ex) {
                    WriteLine($"Method Error: {ex.Message}\n");
                }
            }
        }