private boolean isQuery(HttpServerExchange serverExchange) {
        if (serverExchange.getRequestMethod().toString().equalsIgnoreCase("GET") || serverExchange.getRequestMethod().toString().equalsIgnoreCase("HEAD")) {
            // all GET requests are considered queries
            return true;
        } else if (serverExchange.getRequestMethod().toString().equalsIgnoreCase("POST")) {
            // some POST requests may be queries we need to check.
            if (postQuery != null && postQuery.matcher(serverExchange.getRelativePath()).find()) {
                return true;
            } else {
                return false;
            }
        } else {
            return false;
        }
    }
private boolean isQuery(HttpServerExchange serverExchange) {
        if (serverExchange.getRequestMethod().toString().equalsIgnoreCase("GET") || serverExchange.getRequestMethod().toString().equalsIgnoreCase("HEAD")) {
            
            return true;
        } else if (serverExchange.getRequestMethod().toString().equalsIgnoreCase("POST")) {
            
            if (postQuery != null && postQuery.matcher(serverExchange.getRelativePath()).find()) {
                return true;
            } else {
                return false;
            }
        } else {
            return false;
        }
    }
private boolean isQuery ( HttpServerExchange serverExchange ) { if ( serverExchange . getRequestMethod ( ) . toString ( ) . equalsIgnoreCase ( "GET" ) || serverExchange . getRequestMethod ( ) . toString ( ) . equalsIgnoreCase ( "HEAD" ) ) { // all GET requests are considered queries return true ; } else if ( serverExchange . getRequestMethod ( ) . toString ( ) . equalsIgnoreCase ( "POST" ) ) { // some POST requests may be queries we need to check. if ( postQuery != null && postQuery . matcher ( serverExchange . getRelativePath ( ) ) . find ( ) ) { return true ; } else { return false ; } } else { return false ; } }
Returns if the request is a query request, eg to perform a READ
Returns if the request is a query request eg to perform a READ