feat: rename HttpCustomizer to HttpTransportCustomizer and make it return http.Transport that is later used (#30)

* feat: rename HttpCustomizer to HttpTransportCustomizer and make it return http.Transport that is later used

* linting
This commit is contained in:
Mateusz Filipowicz
2025-02-19 01:03:21 +01:00
committed by GitHub
parent e25b426a84
commit 7c7ef98c03
6 changed files with 39 additions and 58 deletions

View File

@@ -84,14 +84,14 @@ List of available client configuration options is available [here](https://pkg.g
### Customizing HTTP Client
You can customize underlying HTTP client by using `HttpCustomizer` interface:
You can customize underlying HTTP client by using `HttpTransportCustomizer` interface:
```go
c, err := unifi.NewClient(&unifi.ClientConfig{
...
HttpCustomizer: func(transport *http.Transport) error {
HttpTransportCustomizer: func(transport *http.Transport) (*http.Transport, error) {
transport.MaxIdleConns = 10
return nil
return transport, nil
},
})
```