From fef56a24a02841ed00a4bb4d8d4ff8f3d67c4337 Mon Sep 17 00:00:00 2001 From: jholdstock Date: Fri, 28 Jun 2024 11:10:23 +0100 Subject: [PATCH] vote-validator: Use stdlib built-in "POST" const. --- cmd/vote-validator/dcrdata.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/vote-validator/dcrdata.go b/cmd/vote-validator/dcrdata.go index 77833e42..2d44bfc3 100644 --- a/cmd/vote-validator/dcrdata.go +++ b/cmd/vote-validator/dcrdata.go @@ -1,4 +1,4 @@ -// Copyright (c) 2021-2023 The Decred developers +// Copyright (c) 2021-2024 The Decred developers // Use of this source code is governed by an ISC // license that can be found in the LICENSE file. @@ -56,7 +56,7 @@ func (d *dcrdataClient) txns(ctx context.Context, txnHashes []string, spends boo } url := fmt.Sprintf("%s/api/txs?spends=%t", d.URL, spends) - request, err := http.NewRequestWithContext(ctx, "POST", url, bytes.NewBuffer(jsonData)) + request, err := http.NewRequestWithContext(ctx, http.MethodPost, url, bytes.NewBuffer(jsonData)) if err != nil { return nil, err }