MCPcopy Create free account
hub / github.com/kataras/iris / FormValueDefault

Function FormValueDefault

context/context.go:1779–1786  ·  view source on GitHub ↗

FormValueDefault retruns a single parsed form value.

(r *http.Request, name string, def string, postMaxMemory int64, resetBody bool)

Source from the content-addressed store, hash-verified

1777
1778// FormValueDefault retruns a single parsed form value.
1779func FormValueDefault(r *http.Request, name string, def string, postMaxMemory int64, resetBody bool) string {
1780 if form, has := GetForm(r, postMaxMemory, resetBody); has {
1781 if v := form[name]; len(v) > 0 {
1782 return v[0]
1783 }
1784 }
1785 return def
1786}
1787
1788// FormValue returns a single parsed form value by its "name",
1789// including both the URL field's query parameters and the POST or PUT form data.

Callers 1

FormFieldWithConfFunction · 0.92

Calls 1

GetFormFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…