Skip to content

Commit 4c197fd

Browse files
lesnik512claude
andcommitted
docs: clarify caller-defined helpers + add send() pointer
Code-quality review on the Response metadata + typed body subsection flagged that the example used undefined names without acknowledgment and the closing "when to use what" list skipped the build_request + body-only case. This fixes both: - One-line note above the example: process/next_link are caller-defined - Adds a sentence pointing readers at client.send(request, response_model=) as the body-only alternative when they need a custom Request - "Link-header" -> "Link header" to match RFC 5988 terminology Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 3c27dd8 commit 4c197fd

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

‎docs/index.md‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,9 @@ both atomically and routes the decode through the configured
8989
`ResponseDecoder`, so decoder failures surface as `DecodeError` — caught
9090
by `except httpware.ClientError` like every other failure mode.
9191

92-
Canonical use case: RFC 5988 Link-header pagination.
92+
Canonical use case: RFC 5988 Link header pagination.
93+
94+
Assume `process` and `next_link` are caller-defined — pick a Link header parser that fits.
9395

9496
```python
9597
from httpware import AsyncClient
@@ -113,7 +115,8 @@ async def main() -> None:
113115
params = None # next link carries query
114116
```
115117

116-
For the body-only case, prefer `client.get(..., response_model=...)`.
118+
For body-only with a high-level verb, prefer `client.get(..., response_model=...)`.
119+
For body-only with a custom `Request`, prefer `client.send(request, response_model=...)`.
117120
`send_with_response` is not for streaming responses — use `stream()`.
118121

119122
### Streaming responses

0 commit comments

Comments
 (0)