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:
committed by
GitHub
parent
e25b426a84
commit
7c7ef98c03
@@ -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
|
||||
},
|
||||
})
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user