Skip to content

Commit 10b741f

Browse files
stainless-app[bot]stainless-bot
authored andcommitted
chore(docs): document how to do per-request http client customization (#440)
1 parent 0c7aac4 commit 10b741f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

README.md

+6
Original file line numberDiff line numberDiff line change
@@ -392,6 +392,12 @@ client = Finch(
392392
)
393393
```
394394

395+
You can also customize the client on a per-request basis by using `with_options()`:
396+
397+
```python
398+
client.with_options(http_client=DefaultHttpxClient(...))
399+
```
400+
395401
### Managing HTTP resources
396402

397403
By default the library closes underlying HTTP connections whenever the client is [garbage collected](https://docs.python.org/3/reference/datamodel.html#object.__del__). You can manually close the client using the `.close()` method if desired, or with a context manager that closes when exiting.

0 commit comments

Comments
 (0)