Basically Functional
This commit is contained in:
12
internal/web/helpers.go
Normal file
12
internal/web/helpers.go
Normal file
@@ -0,0 +1,12 @@
|
||||
package web
|
||||
|
||||
import "net/http"
|
||||
|
||||
func IsHttpMethod(val string) bool {
|
||||
switch val {
|
||||
case http.MethodGet, http.MethodHead, http.MethodPost, http.MethodPut, http.MethodPatch, http.MethodDelete, http.MethodConnect, http.MethodOptions, http.MethodTrace:
|
||||
return true
|
||||
default:
|
||||
return false
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user