util/httpm: add new package for prettier HTTP method constants
See package doc. Change-Id: Ibbfc8e1f98294217c56f3a9452bd93ffa3103572 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:

committed by
Brad Fitzpatrick

parent
2703d6916f
commit
a1b4ab34e6
@ -17,6 +17,7 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/google/uuid"
|
||||
"tailscale.com/util/httpm"
|
||||
)
|
||||
|
||||
var (
|
||||
@ -59,7 +60,7 @@ func SendAlert(summary, details string) error {
|
||||
return errors.New("no SQUADCAST_WEBHOOK configured")
|
||||
}
|
||||
|
||||
req, err := http.NewRequest(http.MethodPost, webhookUrl, bytes.NewBuffer(sqBody))
|
||||
req, err := http.NewRequest(httpm.POST, webhookUrl, bytes.NewBuffer(sqBody))
|
||||
if err != nil {
|
||||
alertFailed.Add(1)
|
||||
return err
|
||||
|
Reference in New Issue
Block a user