code: protected List<MediaType> getAcceptableMediaTypes(HttpServletRequest request)
              throws HttpMediaTypeNotAcceptableException {
          List<MediaType> mediaTypes = contentNegotiationManager.resolveMediaTypes(new ServletWebRequest(request));
          return mediaTypes.isEmpty() ? Collections.singletonList(MediaType.ALL) : mediaTypes;
      }
docs: Return the acceptable media types from the request.