MCPcopy
hub / github.com/beego/beego / ServeHTTP

Method ServeHTTP

server/web/router.go:995–1003  ·  view source on GitHub ↗

Implement http.Handler interface.

(rw http.ResponseWriter, r *http.Request)

Source from the content-addressed store, hash-verified

993
994// Implement http.Handler interface.
995func (p *ControllerRegister) ServeHTTP(rw http.ResponseWriter, r *http.Request) {
996 ctx := p.GetContext()
997
998 ctx.Reset(rw, r)
999 defer p.GiveBackContext(ctx)
1000
1001 var preFilterParams map[string]string
1002 p.chainRoot.filter(ctx, p.getUrlPath(ctx), preFilterParams)
1003}
1004
1005func (p *ControllerRegister) serveHttp(ctx *beecontext.Context) {
1006 var err error

Callers 15

TestUserFuncFunction · 0.95
TestPostFuncFunction · 0.95
TestAutoFuncFunction · 0.95
TestAutoFunc2Function · 0.95
TestAutoFuncParamsFunction · 0.95
TestAutoExtFuncFunction · 0.95
TestEscapeFunction · 0.95
TestRouteOkFunction · 0.95
TestManyRouteFunction · 0.95
TestEmptyResponseFunction · 0.95
TestNotFoundFunction · 0.95
TestStaticFunction · 0.95

Calls 5

GetContextMethod · 0.95
GiveBackContextMethod · 0.95
getUrlPathMethod · 0.95
filterMethod · 0.80
ResetMethod · 0.65

Tested by 15

TestUserFuncFunction · 0.76
TestPostFuncFunction · 0.76
TestAutoFuncFunction · 0.76
TestAutoFunc2Function · 0.76
TestAutoFuncParamsFunction · 0.76
TestAutoExtFuncFunction · 0.76
TestEscapeFunction · 0.76
TestRouteOkFunction · 0.76
TestManyRouteFunction · 0.76
TestEmptyResponseFunction · 0.76
TestNotFoundFunction · 0.76
TestStaticFunction · 0.76