public static boolean isXHR ( HttpServletRequest httpRequest ) { String requestedWith = httpRequest . getHeader ( X_REQUESTED_WITH ) ; return requestedWith != null ? requestedWith . equalsIgnoreCase ( XML_HTTP_REQUEST ) : false ; }
Test if given HTTP request is performed via XMLHttpRequest .