code: public Route accepts(String... types) {
          Preconditions.checkNotNull(types);
          final ImmutableSet.Builder<MediaType> builder = new ImmutableSet.Builder<>();
          builder.addAll(this.acceptedMediaTypes);
          for (String s : types) {
              builder.add(MediaType.parse(s));
          }
          this.acceptedMediaTypes = builder.build();
          return this;
      }
docs: Sets the set of media types accepted by the route.
  
  @param types the set of type
  @return the current route