code: protected boolean isRestRequest(HttpServletRequest request) {
  		return RestRequestMatcher.INSTANCE.matches(request) || AjaxRequestMatcher.INSTANCE.matches(request);
  	}
docs: Checks if it is a rest request.
  @param request request
  @return true if rest or ajax