Search code examples
dartrikulo

How to gzip the output in Rikulo Stream?


I'd like to compress the HTTP response in Rikulo Stream. Do I have to invoke GZIP explicitly? Or, there is an option to enable?


Solution

  • You can configure it at startup as follows:

    new StreamServer().start()
    .then((HttpChannel channel) {
      channel.httpServer.autoCompress = true;
    });