MCPcopy Create free account
hub / github.com/BryanMwangi/pine / isValidMethod

Function isValidMethod

pine.go:216–223  ·  view source on GitHub ↗

isValidMethod reports whether method is a known HTTP method.

(method string)

Source from the content-addressed store, hash-verified

214
215// isValidMethod reports whether method is a known HTTP method.
216func isValidMethod(method string) bool {
217 switch method {
218 case MethodGet, MethodHead, MethodPost, MethodPut, MethodDelete, MethodPatch, MethodOptions:
219 return true
220 default:
221 return false
222 }
223}
224
225// New creates and returns a new Pine server.
226func New(config ...Config) *Server {

Callers 1

AddRouteMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected