Skip to content

GZip support for Unfiltered, a toolkit for servicing HTTP in Scala

License

Notifications You must be signed in to change notification settings

gerdriesselmann/unfiltered-gzip

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

This is a GZip utility for Unfiltered (https://github.com/n8han/Unfiltered).

It offers a GZip intent you can use like this:

object Echo extends unfiltered.filter.Plan {
  def intent = GZipIntent {
      case Path(Seg(p :: Nil)) => ResponseString(p)
  }
}

Additionally, GZipReponseString can be used as a replacement for ResponseString, like this:

object Echo extends unfiltered.filter.Plan {
  def intent = {
      case req @ Path(Seg(p :: Nil)) => GZipResponseString(req, p)
  }
}

Client's AcceptEncoding headers will always be respected, and Content-Encoding headers will be 
automatically sent.


About

GZip support for Unfiltered, a toolkit for servicing HTTP in Scala

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published