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

Function DecodeQuery

context/context.go:904–913  ·  view source on GitHub ↗

DecodeQuery returns the uri parameter as url (string) useful when you want to pass something to a database and be valid to retrieve it via context.Param use it only for special cases, when the default behavior doesn't suits you. http://www.blooberry.com/indexdot/html/topics/urlencoding.htm it uses

(path string)

Source from the content-addressed store, hash-verified

902// http://www.blooberry.com/indexdot/html/topics/urlencoding.htm
903// it uses just the url.QueryUnescape
904func DecodeQuery(path string) string {
905 if path == "" {
906 return ""
907 }
908 encodedPath, err := url.QueryUnescape(path)
909 if err != nil {
910 return path
911 }
912 return encodedPath
913}
914
915// DecodeURL returns the decoded uri
916// useful when you want to pass something to a database and be valid to retrieve it via context.Param

Callers 2

URLParamEscapeMethod · 0.85
GetEscapeMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…