json support

This commit is contained in:
“nishant-sharma”
2021-04-27 16:40:13 +05:30
parent 256b56e9ad
commit 28a6c1ddff
6 changed files with 122 additions and 22 deletions

View File

@@ -31,8 +31,10 @@ func NewServer(port string) (*Server, error) {
router := mux.NewRouter()
router.HandleFunc("/events", eventsHandler).Methods("POST")
router.HandleFunc("/events/json", eventsHandlerJson).Methods("POST")
router.HandleFunc("/health", healthHandler).Methods("GET")
router.HandleFunc("/health/toggle", healthToggleHandler).Methods("GET")
// router.HandleFunc("/test", testHandler).Methods("GET")
// router.HandleFunc("/schema/refresh", schemaRefreshHandler).Methods("POST")
// router.HandleFunc("/stop", stopHandler).Methods("POST")
@@ -41,4 +43,3 @@ func NewServer(port string) (*Server, error) {
return newServer, nil
}