Created
October 20, 2012 16:32
-
-
Save agemooij/3923858 to your computer and use it in GitHub Desktop.
SprayAdaptiveGzipSupport
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
trait SprayAdaptiveGzipSupport extends directives.EncodingDirectives { | |
import spray.httpx.encoding._ | |
def withAdaptiveCompressionSupport: Directive0 = | |
(decodeRequest(NoEncoding) | decodeRequest(Gzip) | decodeRequest(Deflate)) & | |
(encodeResponse(NoEncoding) | encodeResponse(Gzip) | encodeResponse(Deflate)) | |
} | |
object SprayAdaptiveGzipSupport extends SprayAdaptiveGzipSupport |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment