@Override public List<ContentType> getClientConsumedContentTypes() { return action.getClientConsumedContentTypes(); }
private void addMediaTypes(RestAction<?> action, List<HttpParameter> headerParams) { List<ContentType> contentTypes = action.getClientConsumedContentTypes(); StringBuilder accept = new StringBuilder(); for (ContentType contentType : contentTypes) { accept.append(",").append(contentType); } if (accept.length() > 0) { accept.deleteCharAt(0); } headerParams.add(new HeaderParameter(HttpHeaders.ACCEPT, accept, null)); }