Home / Function/ TestEngineHandleContextUseEscapedPathOverride() — gin Function Reference

TestEngineHandleContextUseEscapedPathOverride() — gin Function Reference

Architecture documentation for the TestEngineHandleContextUseEscapedPathOverride() function in gin_test.go from the gin codebase.

Entity Profile

Relationship Graph

Source Code

gin_test.go lines 778–793

func TestEngineHandleContextUseEscapedPathOverride(t *testing.T) {
	r := New()
	r.UseEscapedPath = true
	r.UseRawPath = true
	r.UnescapePathValues = false

	r.GET("/v1/:path", func(c *Context) {
		assert.Equal(t, "foo%25bar", c.Param("path"))
		c.Status(http.StatusOK)
	})

	assert.NotPanics(t, func() {
		w := PerformRequest(r, http.MethodGet, "/v1/foo%25bar")
		assert.Equal(t, 200, w.Code)
	})
}

Domain

Subdomains

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free