MCPcopy
hub / github.com/gorilla/mux / Methods

Method Methods

route.go:335–340  ·  view source on GitHub ↗

Methods adds a matcher for HTTP methods. It accepts a sequence of one or more methods to be matched, e.g.: "GET", "POST", "PUT".

(methods ...string)

Source from the content-addressed store, hash-verified

333// It accepts a sequence of one or more methods to be matched, e.g.:
334// "GET", "POST", "PUT".
335func (r *Route) Methods(methods ...string) *Route {
336 for k, v := range methods {
337 methods[k] = strings.ToUpper(v)
338 }
339 return r.addMatcher(methodMatcher(methods))
340}
341
342// Path -----------------------------------------------------------------------
343

Callers

nothing calls this directly

Calls 2

addMatcherMethod · 0.95
methodMatcherTypeAlias · 0.85

Tested by

no test coverage detected