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

Method PostValueMany

context/context.go:1940–1947  ·  view source on GitHub ↗

PostValueMany is like `PostValues` method, it returns the post data of a given key. In addition to `PostValues` though, the returned value is a single string separated by commas on multiple values. See ErrEmptyForm, ErrNotFound and ErrEmptyFormField respectfully.

(name string)

Source from the content-addressed store, hash-verified

1938//
1939// See ErrEmptyForm, ErrNotFound and ErrEmptyFormField respectfully.
1940func (ctx *Context) PostValueMany(name string) (string, error) {
1941 values, err := ctx.PostValues(name)
1942 if err != nil || len(values) == 0 {
1943 return "", err
1944 }
1945
1946 return strings.Join(values, ","), nil
1947}
1948
1949// PostValueDefault returns the last parsed form data from POST, PATCH,
1950// or PUT body parameters based on a "name".

Callers

nothing calls this directly

Calls 1

PostValuesMethod · 0.95

Tested by

no test coverage detected