HTTP client docs.
This commit is contained in:
parent
becc4a6370
commit
40c2966afa
17
README.md
17
README.md
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue
Block a user