public static < T > Middleware < SyncHandler < Response < T > > , AsyncHandler < Response < ByteString > > > htmlSerializeResponseSync ( final String templateName ) { Middleware < SyncHandler < Response < T > > , AsyncHandler < Response < T > > > syncToAsync = Middleware :: syncToAsync ; return syncToAsync . and ( htmlSerializeResponse ( templateName ) ) ; }
Sync middleware for a Response object .