(transport httpClientTransport)
| 955 | } |
| 956 | |
| 957 | func newClient(transport httpClientTransport) *Client { |
| 958 | return &Client{ |
| 959 | transport: transport, |
| 960 | header: &Header{ |
| 961 | RequestHeader: &fasthttp.RequestHeader{}, |
| 962 | }, |
| 963 | params: &QueryParam{ |
| 964 | Args: fasthttp.AcquireArgs(), |
| 965 | }, |
| 966 | cookies: &Cookie{}, |
| 967 | path: &PathParam{}, |
| 968 | |
| 969 | userRequestHooks: []RequestHook{}, |
| 970 | builtinRequestHooks: []RequestHook{parserRequestURL, parserRequestHeader, parserRequestBody}, |
| 971 | userResponseHooks: []ResponseHook{}, |
| 972 | builtinResponseHooks: []ResponseHook{parserResponseCookie, logger}, |
| 973 | jsonMarshal: json.Marshal, |
| 974 | jsonUnmarshal: json.Unmarshal, |
| 975 | xmlMarshal: xml.Marshal, |
| 976 | cborMarshal: cbor.Marshal, |
| 977 | cborUnmarshal: cbor.Unmarshal, |
| 978 | xmlUnmarshal: xml.Unmarshal, |
| 979 | logger: log.DefaultLogger[*log.Logger](), |
| 980 | } |
| 981 | } |
| 982 | |
| 983 | // C returns the default client. |
| 984 | func C() *Client { |
no test coverage detected