title: Restlet using custom media type
body: <p>In Restlet 2.3 (SE) I am trying to use media types to control versions. My current attempt involves registering new extensions in my inbound route:</p>
  
  <pre><code>@Override
  public Restlet createInboundRoot() {
  
          ...
          getTunnelService().setExtensionsTunnel(true);
  
          getMetadataService().addExtension("vnd.myapp.v1", MediaType.valueOf("application/vnd.myapp.v1+json"));
          getMetadataService().addExtension("vnd.myapp.v2", MediaType.valueOf("application/vnd.myapp.v2+json"));
  
          ...
  }
  </code></pre>
  
  <p>My resource interface is then setup as follows:</p>
  
  <pre><code>public interface UsersResource {
  
      @Options
      void getCorsSupport();
  
      @Get("vnd.myapp.v1")
      Collection&lt;User&gt; representV1() throws Exception;
  
      // Should be the default if */* is specified
      @Get("json | vnd.myapp.v2")
      Collection&lt;User&gt; representV2() throws Exception;
  
  }
  </code></pre>
  
  <p>I then tried specifying the media types as follows:</p>
  
  <pre><code>http://localhost:8080/api/users?media=vnd.myapp.v1
  </code></pre>
  
  <p>The idea is that if somebody specifies the media type as <code>vnd.myapp.v1</code> they get <code>representV1()</code> (JSON), if they specify the media type as <code>vnd.myapp.v2</code> they get <code>representV2()</code> (JSON) and (optionally) if they ask for nothing specific they get <code>representV2()</code>. With the above setup no matter what is requested I always get back <code>representV2()</code>. </p>