[ApiController] [Route("[controller]")] public class GeneratorStatusController : ControllerBase { static List<string> strings = new List<string>() { "value0", "value1", "value2" }; static CheckForInput() { /// Check to see if I've received any POST requests /// If I haven't received one for 30 minutes, send out /// an email } [HttpGet] public List<string> GetValues() { return strings; } [HttpGet("{id}")] public string Get(int id) { return strings[id]; } [HttpPost("{time}")] public void Post(string time) { strings.Add(time); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)