Skip to content

Add documentation and example for serving binary data from memory#369

Merged
etr merged 2 commits intomasterfrom
claude/review-pr-368-SXvkG
Feb 27, 2026
Merged

Add documentation and example for serving binary data from memory#369
etr merged 2 commits intomasterfrom
claude/review-pr-368-SXvkG

Conversation

@etr
Copy link
Owner

@etr etr commented Feb 27, 2026

The existing string_response already supports binary content (std::string
can hold arbitrary bytes), but this was not documented or demonstrated
anywhere. This gap caused users to believe a new response type was needed
(see PR #368).

  • Add a note to the README's string_response description clarifying
    binary data support
  • Add a new "Serving binary data from memory" section with inline example
  • Add examples/binary_buffer_response.cpp as a complete, buildable example
    that serves a PNG image from an in-memory buffer
  • Register the new example in examples/Makefile.am

https://claude.ai/code/session_01S3BvBrSoNvUhpYTyhPYCjJ

The existing string_response already supports binary content (std::string
can hold arbitrary bytes), but this was not documented or demonstrated
anywhere. This gap caused users to believe a new response type was needed
(see PR #368).

- Add a note to the README's string_response description clarifying
  binary data support
- Add a new "Serving binary data from memory" section with inline example
- Add examples/binary_buffer_response.cpp as a complete, buildable example
  that serves a PNG image from an in-memory buffer
- Register the new example in examples/Makefile.am

https://claude.ai/code/session_01S3BvBrSoNvUhpYTyhPYCjJ
@codecov
Copy link

codecov bot commented Feb 27, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 67.97%. Comparing base (68bff78) to head (6fa84e8).
⚠️ Report is 3 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #369   +/-   ##
=======================================
  Coverage   67.97%   67.97%           
=======================================
  Files          28       28           
  Lines        1636     1636           
  Branches      672      672           
=======================================
  Hits         1112     1112           
  Misses         64       64           
  Partials      460      460           

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 68bff78...6fa84e8. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Add ChangeLog entry for the binary buffer example to satisfy the
ChangeLog Check workflow. Add missing #include <utility> for
std::move to fix cpplint warning.

https://claude.ai/code/session_01S3BvBrSoNvUhpYTyhPYCjJ
@etr etr merged commit 6c115f3 into master Feb 27, 2026
44 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants