netcaptain/internal/web/helpers.go

13 lines
294 B
Go
Raw Normal View History

2020-10-14 21:59:41 +00:00
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
}
}