Skip to content

Commit 6776a3b

Browse files
chore(docs): document how to do per-request http client customization (#440)
1 parent 8144663 commit 6776a3b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -369,6 +369,12 @@ client = Finch(
369369
)
370370
```
371371

372+
You can also customize the client on a per-request basis by using `with_options()`:
373+
374+
```python
375+
client.with_options(http_client=DefaultHttpxClient(...))
376+
```
377+
372378
### Managing HTTP resources
373379

374380
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)