Skip to content

Commit

Permalink
Add docs
Browse files Browse the repository at this point in the history
  • Loading branch information
karpetrosyan committed Aug 7, 2024
1 parent c4ccf45 commit 6e698d7
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion docs/extensions.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ print(r.extensions["http_version"])

A dictionary of `str: Optional[float]` timeout values.

May include values for `'connect'`, `'read'`, `'write'`, or `'pool'`.
May include values for `'connect'`, `'read'`, `'write'`, `'pool'` or `'total'`.

For example:

Expand All @@ -86,6 +86,18 @@ r = httpcore.request(
)
```

or

```python
# Timeout if we are blocked waiting for the connection read for more
# than a second, or if the total time of the request exceeds 10 seconds.
r = httpcore.request(
"GET",
"https://www.example.com",
extensions={"timeout": {"read": 1.0, "total": 10.0}}
)
```

### `"trace"`

The trace extension allows a callback handler to be installed to monitor the internal
Expand Down

0 comments on commit 6e698d7

Please sign in to comment.