private static boolean isDefaultContentType(final HttpServletRequest request) {
        val header = request.getHeader(HttpHeaders.ACCEPT);
        val accept = StringUtils.defaultString(header);
        return StringUtils.isBlank(accept) || accept.startsWith(MediaType.ALL_VALUE) || accept.startsWith(MediaType.TEXT_HTML_VALUE);
    }
This is {@link DefaultTicketGrantingTicketResourceEntityResponseFactory}.

@author Misagh Moayyed
@since 5.2.0
core/cas-server-core-rest-api/src/main/java/org/apereo/cas/rest/factory/DefaultTicketGrantingTicketResourceEntityResponseFactory.java