Skip to content

docs: update body_snapshot docstring for clarity#73

Open
Benflow3 wants to merge 2 commits into
dexpace:mainfrom
Benflow3:doc-rewording
Open

docs: update body_snapshot docstring for clarity#73
Benflow3 wants to merge 2 commits into
dexpace:mainfrom
Benflow3:doc-rewording

Conversation

@Benflow3

@Benflow3 Benflow3 commented Jun 17, 2026

Copy link
Copy Markdown

Summary

  • modify docstring of body_snapshot method
  • this clarify the behavior of body_snapshot method for LoggableResponseBody by rewriting its previous documentation.
Clarify behavior of body_snapshot method for LoggableResponseBody.
Safe to call from logging and post-mortem paths: it never drains a
single-use stream. Bytes are only returned when the body has already
been captured for repeatable reads (a ``LoggableResponseBody``); for
For a LoggableResponseBody, the snapshot drains and caches the inner

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified this against the code and it's accurate — it does drain and cache the inner body on the first read. Only nit: wrap LoggableResponseBody in double backticks to match the rest of the docstring, then it's good to merge.

@Benflow3 Benflow3 Jun 17, 2026

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The formatting has been fixed
Close #41

Wrap LoggableResponseBody in double backticks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants