Skip to content

Commit 7f5cc44

Browse files
committed
describe overriding http client opts
1 parent 404416d commit 7f5cc44

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,16 @@ It's possible to use a custom cache by creating a child class of the [CacheInter
154154
>>> $client = new IPinfo($access_token, $settings);
155155
```
156156

157+
### Overriding HTTP Client options
158+
159+
The IPinfo client constructor accepts a `timeout` key which is the request
160+
timeout in seconds.
161+
162+
For full flexibility, a `guzzle_opts` key is accepted which accepts an
163+
associative array which is described in [Guzzle Request Options](https://docs.guzzlephp.org/en/stable/request-options.html).
164+
Options set here will override any custom settings set by the IPinfo client
165+
internally in case of conflict, including headers.
166+
157167
### Internationalization
158168

159169
When looking up an IP address, the response object includes a `Details->country_name` attribute which includes the country name based on American English. It is possible to return the country name in other languages by setting the `countries_file` keyword argument when creating the `IPinfo` object.

0 commit comments

Comments
 (0)