static void sendResponse ( final HttpServerExchange exchange , final String response ) { exchange . setStatusCode ( StatusCodes . OK ) ; exchange . getResponseHeaders ( ) . add ( Headers . CONTENT_TYPE , CONTENT_TYPE ) ; final Sender sender = exchange . getResponseSender ( ) ; UndertowLogger . ROOT_LOGGER . mcmpSendingResponse ( exchange . getSourceAddress ( ) , exchange . getStatusCode ( ) , exchange . getResponseHeaders ( ) , response ) ; sender . send ( response ) ; }
Send a simple response string .