all: use http package to replace http method names (#26535)

This commit is contained in:
Shude Li
2023-01-24 11:12:25 +02:00
committed by GitHub
parent e4fa2cf5e3
commit 163e996d0e
7 changed files with 12 additions and 12 deletions
+1 -1
View File
@@ -48,7 +48,7 @@ func errorJSON(msg string) []byte {
}
func (h GraphiQL) ServeHTTP(w http.ResponseWriter, r *http.Request) {
if r.Method != "GET" {
if r.Method != http.MethodGet {
respond(w, errorJSON("only GET requests are supported"), http.StatusMethodNotAllowed)
return
}