From a913b808f929a133ee4bcde6401072504be14512 Mon Sep 17 00:00:00 2001 From: xuhuaiyu <391585975@qq.com> Date: Tue, 7 May 2019 13:20:13 +0800 Subject: [PATCH] address comment --- server/statistics_handler.go | 9 --------- 1 file changed, 9 deletions(-) diff --git a/server/statistics_handler.go b/server/statistics_handler.go index 24d9e7a202aa7..b80674c2ef028 100644 --- a/server/statistics_handler.go +++ b/server/statistics_handler.go @@ -14,7 +14,6 @@ package server import ( - "errors" "net/http" "time" @@ -48,10 +47,6 @@ func (s *Server) newStatsHandler() *StatsHandler { } func (sh StatsHandler) ServeHTTP(w http.ResponseWriter, req *http.Request) { - if req.Method != http.MethodGet { - writeError(w, errors.New("only http GET method is supported")) - return - } w.Header().Set("Content-Type", "application/json") params := mux.Vars(req) @@ -90,10 +85,6 @@ func (s *Server) newStatsHistoryHandler() *StatsHistoryHandler { } func (sh StatsHistoryHandler) ServeHTTP(w http.ResponseWriter, req *http.Request) { - if req.Method != http.MethodGet { - writeError(w, errors.New("only http GET method is supported")) - return - } w.Header().Set("Content-Type", "application/json") params := mux.Vars(req)