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

Struct Client

client/client.go:43–73  ·  view source on GitHub ↗

Client provides Fiber's high-level HTTP API while delegating transport work to fasthttp.Client, fasthttp.HostClient, or fasthttp.LBClient implementations. Settings configured on the client are shared across every request and may be overridden per request when needed. Client is safe for concurrent r

Source from the content-addressed store, hash-verified

41// Client is safe for concurrent request execution after configuration is
42// complete. Concurrent configuration changes require external synchronization.
43type Client struct {
44 logger log.CommonLogger
45 transport httpClientTransport
46
47 header *Header
48 params *QueryParam
49 cookies *Cookie
50 path *PathParam
51
52 jsonMarshal utils.JSONMarshal
53 jsonUnmarshal utils.JSONUnmarshal
54 xmlMarshal utils.XMLMarshal
55 xmlUnmarshal utils.XMLUnmarshal
56 cborMarshal utils.CBORMarshal
57 cborUnmarshal utils.CBORUnmarshal
58
59 cookieJar *CookieJar
60 retryConfig *RetryConfig
61 baseURL string
62 userAgent string
63 referer string
64 userRequestHooks []RequestHook
65 builtinRequestHooks []RequestHook
66 userResponseHooks []ResponseHook
67 builtinResponseHooks []ResponseHook
68
69 timeout time.Duration
70 mu sync.RWMutex
71 isDebug bool
72 isPathNormalizingDisabled bool
73}
74
75// Do executes the request using the underlying fasthttp transport.
76//

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected