MCPcopy
hub / github.com/gofiber/fiber / WithClient

Function WithClient

middleware/proxy/proxy.go:133–139  ·  view source on GitHub ↗

WithClient sets the global proxy client. This function should be called before Do and Forward.

(cli *fasthttp.Client)

Source from the content-addressed store, hash-verified

131// WithClient sets the global proxy client.
132// This function should be called before Do and Forward.
133func WithClient(cli *fasthttp.Client) {
134 if cli == nil {
135 panic("proxy: WithClient requires a non-nil *fasthttp.Client")
136 }
137
138 client.Store(cli)
139}
140
141// Forward performs the given http request and fills the given http response.
142// This method will return a fiber.Handler

Calls 1

StoreMethod · 0.80