code: public boolean isCompliantWithRequestAccept(Request request) {
          if (producedMediaTypes == null || producedMediaTypes.isEmpty() || request == null
                  || request.getHeader(HeaderNames.ACCEPT) == null) {
              return true;
          } else {
              for (MediaType mt : producedMediaTypes) {
                  if (request.accepts(mt.toString())) {
                      return true;
                  }
              }
              return false;
          }
      }
docs: Checks whether the given request is compliant with the media type accepted by the current route.
  
  @param request the request
  @return {@code true} if the request is compliant, {@code false} otherwise