コード例 #1
0
        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("", "");
        }
コード例 #2
0
 public override void HandleGetRequest(SimpleHttpProcessor processor)
 {
     Console.WriteLine("GET");
     processor.WriteSuccess("ok", "text/html");
 }