Browse code

builder-next: use constants for http methods

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>

Sebastiaan van Stijn authored on 2019/10/13 03:40:56
Showing 1 changed files
... ...
@@ -42,7 +42,7 @@ func (h *reqBodyHandler) newRequest(rc io.ReadCloser) (string, func()) {
42 42
 func (h *reqBodyHandler) RoundTrip(req *http.Request) (*http.Response, error) {
43 43
 	host := req.URL.Host
44 44
 	if strings.HasPrefix(host, urlPrefix) {
45
-		if req.Method != "GET" {
45
+		if req.Method != http.MethodGet {
46 46
 			return nil, errors.Errorf("invalid request")
47 47
 		}
48 48
 		id := strings.TrimPrefix(host, urlPrefix)