pub fn body_with_hook(body: HttpBody, hook: Option<EndHook>) -> HttpBody
body with hook attached: a stream is wrapped, an in-memory body becomes a one-piece stream so the hook still fires when it is consumed.
body
hook