HTTP client docs.

This commit is contained in:
Alexander Zhuravlev 2022-03-31 00:16:33 +03:00
parent becc4a6370
commit 40c2966afa
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