public override void HandlePostRequest(SimpleHttpProcessor processor, StreamReader inputData) { var json = inputData.ReadToEnd(); Debug.WriteLine(json); Console.WriteLine(json); try { var hookEvent = JsonConvert.DeserializeObject <HookEvent>(json); OnEvent?.Invoke(hookEvent); } catch (Exception ex) { Console.WriteLine(ex); } processor.WriteSuccess("", ""); }
public override void HandleGetRequest(SimpleHttpProcessor processor) { Console.WriteLine("GET"); processor.WriteSuccess("ok", "text/html"); }