public static void endExchange ( HttpServerExchange exchange , int statusCode , String reasonPhrase ) { exchange . setStatusCode ( statusCode ) ; if ( reasonPhrase != null ) { exchange . setReasonPhrase ( reasonPhrase ) ; } exchange . endExchange ( ) ; }
Changes the status code of the response sets the HTTP reason phrase and ends the exchange .