Home / Function/ TestHEAD() — gin Function Reference

TestHEAD() — gin Function Reference

Architecture documentation for the TestHEAD() function in gins_test.go from the gin codebase.

Entity Profile

Relationship Graph

Source Code

ginS/gins_test.go lines 99–109

func TestHEAD(t *testing.T) {
	HEAD("/head", func(c *gin.Context) {
		c.String(http.StatusOK, "head")
	})

	req := httptest.NewRequest(http.MethodHead, "/head", nil)
	w := httptest.NewRecorder()
	engine().ServeHTTP(w, req)

	assert.Equal(t, http.StatusOK, w.Code)
}

Subdomains

Analyze Your Own Codebase

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

Try Supermodel Free