protocol-http icon indicating copy to clipboard operation
protocol-http copied to clipboard

Introduce `rewind` and `rewindable?` as a general concept.

Open ioquatix opened this issue 1 year ago • 0 comments

There are situations where we need to rewind the input or output, for example idempotent request handling and redirects. Previously, body.respond_to?(:rewind) was used but it's better to expose a predicate.

In addition, I noticed that we have two usage of wrap(body) and wrap(request|response). I'd like to use a different method name if possible, and this also applies to rewindable body wrappers.

Types of Changes

  • New feature.
  • Maintenance.

Contribution

ioquatix avatar Aug 14 '24 13:08 ioquatix