public List<MediaType> getAccept() {
        if (isNull(accept)) {
            List<MediaType> accepts = getHeader(HeaderName.ACCEPT)
                .map(MediaType::list)
                .get();

            this.accept = nonEmpty(accepts) ? accepts : singletonList(WILDCARD);
        }
        return accept;
    }
public List < MediaType > getAccept ( ) { if ( isNull ( accept ) ) { List < MediaType > accepts = getHeader ( HeaderName . ACCEPT ) . map ( MediaType :: list ) . get ( ) ; this . accept = nonEmpty ( accepts ) ? accepts : singletonList ( WILDCARD ) ; } return accept ; }
Returns a accept header value

@return accept header value in {@link Optional} object