pub fn create_response_with_body<T1, T2>( request: &Request<T1>, generate_body: impl FnOnce() -> T2, ) -> Result<Response<T2>>
Create a response for the request with a custom body.