func (this *SunnyRouter) ServeRequestedEndPoint(w http.ResponseWriter, r *http.Request, rep *RequestedEndPoint) { if rep != nil { ctxt := web.NewContext(w, r) ctxt.UPath = rep.UPath ctxt.PData = rep.PData if !HandleHeaders(ctxt, rep.EndPoint, rep.Handler) { if ctxthandler, ok := rep.Handler.(web.ContextHandler); ok { ctxthandler.ServeContextHTTP(ctxt) } else { rep.Handler.ServeHTTP(w, r) } } } else { http.NotFound(w, r) } }
func (this *DynamicHandler) ServeOptions(w http.ResponseWriter, r *http.Request, origin map[string]string) { this.ServeContextOptions(web.NewContext(w, r), origin) }
func (this *DynamicHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { this.ServeContextHTTP(web.NewContext(w, r)) }
func (f ContextHTTPHandlerFunc) ServeHTTP(w http.ResponseWriter, r *http.Request) { f(web.NewContext(w, r)) }