all: consistently use http.Method{Get,Post,Put} across the codebase

This is a follow-up after 9dec3c8f80
This commit is contained in:
Aliaksandr Valialkin
2023-02-22 18:58:44 -08:00
parent 9dec3c8f80
commit 510f78a96b
10 changed files with 12 additions and 12 deletions

View File

@@ -674,7 +674,7 @@ func WriteAPIHelp(w io.Writer, pathList [][2]string) {
// GetRequestURI returns requestURI for r.
func GetRequestURI(r *http.Request) string {
requestURI := r.RequestURI
if r.Method != "POST" {
if r.Method != http.MethodPost {
return requestURI
}
_ = r.ParseForm()