Test_Proxy_Do_HTTP_Prefix_URL() — fiber Function Reference
Architecture documentation for the Test_Proxy_Do_HTTP_Prefix_URL() function in proxy_test.go from the fiber codebase.
Entity Profile
Dependency Diagram
graph TD 0c3418af_2a46_fedb_f7cf_1e864690acfb["Test_Proxy_Do_HTTP_Prefix_URL()"] a7c70172_e40a_6ad6_65b6_b8f508cfb0a2["proxy_test.go"] 0c3418af_2a46_fedb_f7cf_1e864690acfb -->|defined in| a7c70172_e40a_6ad6_65b6_b8f508cfb0a2 52270b9b_26c8_081b_5239_bee723ca512a["createProxyTestServerIPv4()"] 0c3418af_2a46_fedb_f7cf_1e864690acfb -->|calls| 52270b9b_26c8_081b_5239_bee723ca512a style 0c3418af_2a46_fedb_f7cf_1e864690acfb fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
middleware/proxy/proxy_test.go lines 709–734
func Test_Proxy_Do_HTTP_Prefix_URL(t *testing.T) {
t.Parallel()
_, addr := createProxyTestServerIPv4(t, func(c fiber.Ctx) error {
return c.SendString("hello world")
})
app := fiber.New()
app.Get("/*", func(c fiber.Ctx) error {
path := c.OriginalURL()
url := strings.TrimPrefix(path, "/")
require.Equal(t, "http://"+addr, url)
if err := Do(c, url); err != nil {
return err
}
c.Response().Header.Del(fiber.HeaderServer)
return nil
})
resp, err := app.Test(httptest.NewRequest(fiber.MethodGet, "/http://"+addr, http.NoBody))
require.NoError(t, err)
s, err := io.ReadAll(resp.Body)
require.NoError(t, err)
require.Equal(t, "hello world", string(s))
}
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does Test_Proxy_Do_HTTP_Prefix_URL() do?
Test_Proxy_Do_HTTP_Prefix_URL() is a function in the fiber codebase, defined in middleware/proxy/proxy_test.go.
Where is Test_Proxy_Do_HTTP_Prefix_URL() defined?
Test_Proxy_Do_HTTP_Prefix_URL() is defined in middleware/proxy/proxy_test.go at line 709.
What does Test_Proxy_Do_HTTP_Prefix_URL() call?
Test_Proxy_Do_HTTP_Prefix_URL() calls 1 function(s): createProxyTestServerIPv4.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free