code: func (s *Server) RequireHTTPMethods(logger log.Logger,
  	handler HandlerFunc, methods ...string) HandlerFunc {
  	l := logger.Add("method", "RequireHTTPMethods")
  	return func(w http.ResponseWriter, r *http.Request, ctx *Context) {
  		for _, v := range methods {
  			if v == r.Method {
  				handler(w, r, ctx)
  				return
  			}
  		}
  
  		l.Add("sender", r.RemoteAddr).Warn("not allowed HTTP method")
  		s.RespondError(logger, w, ErrMethodNotAllowed)
  	}
  }
docs: // RequireHTTPMethods wraps a given handler function inside an HTTP method
  // validating handler.