forked from mirror/client_golang
Replaced hardcoded arg('GET') with http.MethodGet constant
This commit is contained in:
parent
e69720d204
commit
e06fadcc6f
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue