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

Method URLParams

context/context.go:1710–1719  ·  view source on GitHub ↗

URLParams returns a map of URL Query parameters. If the value of a URL parameter is a slice, then it is joined as one separated by comma. It returns an empty map on empty URL query. See URLParamsSorted too.

()

Source from the content-addressed store, hash-verified

1708//
1709// See URLParamsSorted too.
1710func (ctx *Context) URLParams() map[string]string {
1711 q := ctx.getQuery()
1712 values := make(map[string]string, len(q))
1713
1714 for k, v := range q {
1715 values[k] = strings.Join(v, ",")
1716 }
1717
1718 return values
1719}
1720
1721// URLParamsSorted returns a sorted (by key) slice
1722// of key-value entries of the URL Query parameters.

Callers 1

newAppFunction · 0.80

Calls 1

getQueryMethod · 0.95

Tested by

no test coverage detected