private String getCookieValue ( HttpServerExchange exchange , String cookieName ) { String value = null ; Map < String , Cookie > requestCookies = exchange . getRequestCookies ( ) ; if ( requestCookies != null ) { Cookie cookie = exchange . getRequestCookies ( ) . get ( cookieName ) ; if ( cookie != null ) { value = cookie . getValue ( ) ; } } return value ; }
Retrieves the value of a cookie with a given name from a HttpServerExchange