MCPcopy Index your code
hub / github.com/mpolden/echoip / Header

Method Header

http/router.go:51–55  ·  view source on GitHub ↗
(header, value string)

Source from the content-addressed store, hash-verified

49}
50
51func (r *route) Header(header, value string) {
52 r.MatcherFunc(func(req *http.Request) bool {
53 return req.Header.Get(header) == value
54 })
55}
56
57func (r *route) MatcherFunc(f func(*http.Request) bool) {
58 r.matcherFunc = f

Callers 7

JSONHandlerMethod · 0.80
HealthHandlerMethod · 0.80
PortHandlerMethod · 0.80
cacheResizeHandlerMethod · 0.80
cacheHandlerMethod · 0.80
ServeHTTPMethod · 0.80
HandlerMethod · 0.80

Calls 2

MatcherFuncMethod · 0.95
GetMethod · 0.80

Tested by

no test coverage detected