ring 2022-10-27

How would I wrap a handler's response body with a delay ? I want to be able to use the wrap-head middleware without paying the full cost of responding to a GET request. Searching online, I found out that one way to do this was to wrap the response body in a delay, but I don't see how this helps,

Which Ring adapter are you using, out of interest?

[luminus/ring-undertow-adapter "1.2.8"] I do not use the luminus framework; but I do make use of this ring adapter

You can wrap the body in a delay, and then extend the StreamableResponseBody protocol to resolve it.

Huh. I was trying to do exactly this but I kept getting "Body class not supported". Turns out my Ring adapter does not conform to the spec, but extending its own RespondBody protocol did the trick. Thanks for the help!