title: How can I return JSON with HTTP code in Vibe.d?
body: <p>I would like to return not only JSON, but also the HTTP response code.</p>
  
  <p>I registering REST interface through URLRouter:</p>
  
  <pre class="lang-d prettyprint-override"><code>router.registerRestInterface(new ClientServerAPI);
  </code></pre>
  
  <p>Example of my REST implementation: </p>
  
  <pre class="lang-d prettyprint-override"><code>module clienserverapi.clientserver;
  
  import api.clientserver;
  import models.replies.client_versions;
  
  /**
      Implementation of Client-Server API.
  */
  class ClientServerAPI : IClientServerAPI {
  @safe:
      ClientVersions getSupportedClientVersions() {
          bool[string] unstableFeatures;
          return ClientVersions(supportedVersions.dup, unstableFeatures);
      }
  }
  </code></pre>