Merge pull request #9 from ekomobile/http_client_option

Docs. Http client option.
This commit is contained in:
Alex 2022-03-31 00:45:12 +03:00 committed by GitHub
commit 70d78f7409
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 2 deletions

View File

@ -44,7 +44,10 @@ func DaDataExample() {
}
```
## Credentials
## Configuration
### Credentials
`DADATA_API_KEY` and `DADATA_SECRET_KEY` environment variables are used by default to authenticate client.
@ -61,5 +64,17 @@ creds := client.Credentials{
api := NewSuggestApi(client.WithCredentialProvider(&creds))
```
### HTTP client
HTTP client may be overridden with custom one:
```go
httpClient := &http.Client{}
api := NewSuggestApi(WithHttpClient(httpClient))
```
## Licence
MIT see [LICENSE](LICENSE)

View File

@ -1 +1 @@
2.4.1
2.4.2