Don't require slash for node stats

This commit is contained in:
Alex Dadgar
2016-06-11 13:15:57 -07:00
parent b1d4230a4c
commit a9c97cfb19
2 changed files with 2 additions and 2 deletions

View File

@@ -90,7 +90,7 @@ func (n *Nodes) Stats(nodeID string, q *QueryOptions) (*HostStats, error) {
return nil, err
}
var resp []HostStats
if _, err := client.query("/v1/client/stats/", &resp, nil); err != nil {
if _, err := client.query("/v1/client/stats", &resp, nil); err != nil {
return nil, err
}

View File

@@ -114,7 +114,7 @@ func (s *HTTPServer) registerHandlers(enableDebug bool) {
s.mux.HandleFunc("/v1/evaluation/", s.wrap(s.EvalSpecificRequest))
s.mux.HandleFunc("/v1/client/fs/", s.wrap(s.FsRequest))
s.mux.HandleFunc("/v1/client/stats/", s.wrap(s.ClientStatsRequest))
s.mux.HandleFunc("/v1/client/stats", s.wrap(s.ClientStatsRequest))
s.mux.HandleFunc("/v1/client/allocation/", s.wrap(s.ClientAllocRequest))
s.mux.HandleFunc("/v1/agent/self", s.wrap(s.AgentSelfRequest))