Replaced hardcoded arg('GET') with http.MethodGet constant

This commit is contained in:
Vaisakh Rajagopal 2018-02-23 00:45:29 +05:30
parent e69720d204
commit e06fadcc6f
1 changed files with 3 additions and 3 deletions

View File

@ -146,7 +146,7 @@ func (h *httpAPI) Query(ctx context.Context, query string, ts time.Time) (model.
u.RawQuery = q.Encode()
req, err := http.NewRequest("GET", u.String(), nil)
req, err := http.NewRequest(http.MethodGet, u.String(), nil)
if err != nil {
return nil, err
}
@ -179,7 +179,7 @@ func (h *httpAPI) QueryRange(ctx context.Context, query string, r Range) (model.
u.RawQuery = q.Encode()
req, err := http.NewRequest("GET", u.String(), nil)
req, err := http.NewRequest(http.MethodGet, u.String(), nil)
if err != nil {
return nil, err
}
@ -223,7 +223,7 @@ func (h *httpAPI) Series(ctx context.Context, matches []string, startTime time.T
u.RawQuery = q.Encode()
req, err := http.NewRequest("GET", u.String(), nil)
req, err := http.NewRequest(http.MethodGet, u.String(), nil)
if err != nil {
return nil, err
}