MCPcopy
hub / github.com/gin-gonic/gin / HandleContext

Method HandleContext

gin.go:680–688  ·  view source on GitHub ↗

HandleContext re-enters a context that has been rewritten. This can be done by setting c.Request.URL.Path to your new target. Disclaimer: You can loop yourself to deal with this, use wisely.

(c *Context)

Source from the content-addressed store, hash-verified

678// This can be done by setting c.Request.URL.Path to your new target.
679// Disclaimer: You can loop yourself to deal with this, use wisely.
680func (engine *Engine) HandleContext(c *Context) {
681 oldIndexValue := c.index
682 oldHandlers := c.handlers
683 c.reset()
684 engine.handleHTTPRequest(c)
685
686 c.index = oldIndexValue
687 c.handlers = oldHandlers
688}
689
690func (engine *Engine) handleHTTPRequest(c *Context) {
691 httpMethod := c.Request.Method

Calls 2

handleHTTPRequestMethod · 0.95
resetMethod · 0.45