public static Middleware < AsyncHandler < ? > , AsyncHandler < Response < ? > > > replyContentType ( String contentType ) { return inner -> inner . map ( Middlewares :: ensureResponse ) . map ( response -> response . withHeader ( CONTENT_TYPE , contentType ) ) ; }
Middleware that adds the ability to set the response s Content - Type header to a defined value .