MCPcopy
hub / github.com/gorilla/mux / UseEncodedPath

Method UseEncodedPath

mux.go:269–272  ·  view source on GitHub ↗

UseEncodedPath tells the router to match the encoded original path to the routes. For eg. "/path/foo%2Fbar/to" will match the path "/path/{var}/to". If not called, the router will match the unencoded path to the routes. For eg. "/path/foo%2Fbar/to" will match the path "/path/foo/bar/to"

()

Source from the content-addressed store, hash-verified

267// If not called, the router will match the unencoded path to the routes.
268// For eg. "/path/foo%2Fbar/to" will match the path "/path/foo/bar/to"
269func (r *Router) UseEncodedPath() *Router {
270 r.useEncodedPath = true
271 return r
272}
273
274// ----------------------------------------------------------------------------
275// Route factories

Callers 1

TestUseEncodedPathFunction · 0.95

Calls

no outgoing calls

Tested by 1

TestUseEncodedPathFunction · 0.76