New creates and returns a new Client object.
()
| 924 | |
| 925 | // New creates and returns a new Client object. |
| 926 | func New() *Client { |
| 927 | // Follow-up performance optimizations: |
| 928 | // Try to use a pool to reduce the memory allocation cost for the Fiber client and the fasthttp client. |
| 929 | // If possible, also consider pooling other structs (e.g., request headers, cookies, query parameters, path parameters). |
| 930 | return NewWithClient(&fasthttp.Client{}) |
| 931 | } |
| 932 | |
| 933 | // NewWithClient creates and returns a new Client object from an existing fasthttp.Client. |
| 934 | func NewWithClient(c *fasthttp.Client) *Client { |