Home / Function/ Test_Proxy_Forward_Global_Client() — fiber Function Reference

Test_Proxy_Forward_Global_Client() — fiber Function Reference

Architecture documentation for the Test_Proxy_Forward_Global_Client() function in proxy_test.go from the fiber codebase.

Entity Profile

Dependency Diagram

graph TD
  23fd4856_5219_6d71_6f39_6befe9ad0ce6["Test_Proxy_Forward_Global_Client()"]
  a7c70172_e40a_6ad6_65b6_b8f508cfb0a2["proxy_test.go"]
  23fd4856_5219_6d71_6f39_6befe9ad0ce6 -->|defined in| a7c70172_e40a_6ad6_65b6_b8f508cfb0a2
  fc2b6784_0dfb_d6e2_4148_406d442e8019["startServer()"]
  23fd4856_5219_6d71_6f39_6befe9ad0ce6 -->|calls| fc2b6784_0dfb_d6e2_4148_406d442e8019
  style 23fd4856_5219_6d71_6f39_6befe9ad0ce6 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

middleware/proxy/proxy_test.go lines 737–760

func Test_Proxy_Forward_Global_Client(t *testing.T) {
	t.Parallel()
	ln, err := net.Listen(fiber.NetworkTCP4, "127.0.0.1:0")
	require.NoError(t, err)
	WithClient(&fasthttp.Client{
		NoDefaultUserAgentHeader: true,
		DisablePathNormalizing:   true,
	})
	app := fiber.New()
	app.Get("/test_global_client", func(c fiber.Ctx) error {
		return c.SendString("test_global_client")
	})

	addr := ln.Addr().String()
	app.Use(Forward("http://" + addr + "/test_global_client"))
	startServer(app, ln)

	client := clientpkg.New()
	resp, err := client.Get("http://" + addr)
	require.NoError(t, err)
	require.Equal(t, fiber.StatusOK, resp.StatusCode())
	require.Equal(t, "test_global_client", string(resp.Body()))
	resp.Close()
}

Domain

Subdomains

Frequently Asked Questions

What does Test_Proxy_Forward_Global_Client() do?
Test_Proxy_Forward_Global_Client() is a function in the fiber codebase, defined in middleware/proxy/proxy_test.go.
Where is Test_Proxy_Forward_Global_Client() defined?
Test_Proxy_Forward_Global_Client() is defined in middleware/proxy/proxy_test.go at line 737.
What does Test_Proxy_Forward_Global_Client() call?
Test_Proxy_Forward_Global_Client() calls 1 function(s): startServer.

Analyze Your Own Codebase

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

Try Supermodel Free