khrt / Raisin

Raisin - a REST API micro framework for Perl 🐫 🐪
62 stars 31 forks source link

Added support for deferred responses #115

Closed budney closed 3 years ago

budney commented 3 years ago

Instead of serializing the body whenever it's a reference, this change limits that behavior to when the body is a logical array reference, thus letting file handles be processed downstream. The primary effect of this change is that the Encoder object doesn't get invoked, so the creator of the file handle is fully responsible for ensuring that the bodyd is encoded correctly.

khrt commented 3 years ago

@budney, thanks for the pull request!

I would like to merge it, but could you please help me figuring why tests are failing on your branch?

budney commented 3 years ago

I've fixed the broken tests by making the code change much more specific: it now does what it used to for any reference EXCEPT filehandles.