ring

hifumi123 2022-10-27T05:45:48.459829Z

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,

weavejester 2022-11-04T08:48:38.165059Z

Which Ring adapter are you using, out of interest?

hifumi123 2022-11-04T14:58:43.560549Z

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

weavejester 2022-10-29T02:17:43.235339Z

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

hifumi123 2022-10-31T21:09:33.057879Z

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!