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

Method initFormCache

context.go:638–649  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

636}
637
638func (c *Context) initFormCache() {
639 if c.formCache == nil {
640 c.formCache = make(url.Values)
641 req := c.Request
642 if err := req.ParseMultipartForm(c.engine.MaxMultipartMemory); err != nil {
643 if !errors.Is(err, http.ErrNotMultipart) {
644 debugPrint("error on parse multipart form array: %v", err)
645 }
646 }
647 c.formCache = req.PostForm
648 }
649}
650
651// GetPostFormArray returns a slice of strings for a given form key, plus
652// a boolean value whether at least one value exists for the given key.

Callers 2

GetPostFormArrayMethod · 0.95
GetPostFormMapMethod · 0.95

Calls 1

debugPrintFunction · 0.85

Tested by

no test coverage detected