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

Method PostForm

context.go:601–604  ·  view source on GitHub ↗

PostForm returns the specified key from a POST urlencoded form or multipart form when it exists, otherwise it returns an empty string `("")`.

(key string)

Source from the content-addressed store, hash-verified

599// PostForm returns the specified key from a POST urlencoded form or multipart form
600// when it exists, otherwise it returns an empty string `("")`.
601func (c *Context) PostForm(key string) (value string) {
602 value, _ = c.GetPostForm(key)
603 return
604}
605
606// DefaultPostForm returns the specified key from a POST urlencoded form or multipart form
607// when it exists, otherwise it returns the specified defaultValue string.

Callers 3

TestContextQueryFunction · 0.80

Calls 1

GetPostFormMethod · 0.95

Tested by 3

TestContextQueryFunction · 0.64