Skip to content

Add IO conversion for readable bodies. - #115

Merged
samuel-williams-shopify merged 1 commit into
mainfrom
body-to-io
Aug 4, 2026
Merged

Add IO conversion for readable bodies.#115
samuel-williams-shopify merged 1 commit into
mainfrom
body-to-io

Conversation

@samuel-williams-shopify

@samuel-williams-shopify samuel-williams-shopify commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Add Protocol::HTTP::Body::Readable#to_io for adapting chunk-readable HTTP bodies to IO-oriented consumers. Each call returns a fresh, read-only Protocol::HTTP::Body::Stream.

Protocol::HTTP::Body::Stream now defaults to no output rather than allocating an implicit Buffered body. Duplex consumers remain supported by passing both input and output explicitly.

  • Cover sized reads and rejected writes through the read-only adapter.
  • Document nullable stream endpoints.
  • Add unreleased notes for both behavioral changes.

Verification: bundle exec bake test (764 tests, 1,551 assertions); changed-file RuboCop; Decode 469/469.

@samuel-williams-shopify
samuel-williams-shopify merged commit 2c3115e into main Aug 4, 2026
34 of 40 checks passed
@samuel-williams-shopify
samuel-williams-shopify deleted the body-to-io branch August 4, 2026 23:01
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.

1 participant