Class GzipRequestInterceptor

java.lang.Object
de.iip_ecosphere.platform.support.semanticId.eclass.handler.GzipRequestInterceptor
All Implemented Interfaces:
com.squareup.okhttp.Interceptor

class GzipRequestInterceptor extends Object implements com.squareup.okhttp.Interceptor
Encodes request bodies using gzip. Taken from https://github.com/square/okhttp/issues/350
  • Nested Class Summary

    Nested classes/interfaces inherited from interface com.squareup.okhttp.Interceptor

    com.squareup.okhttp.Interceptor.Chain
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    private com.squareup.okhttp.RequestBody
    forceContentLength(com.squareup.okhttp.RequestBody requestBody)
     
    private com.squareup.okhttp.RequestBody
    gzip(com.squareup.okhttp.RequestBody body)
     
    com.squareup.okhttp.Response
    intercept(com.squareup.okhttp.Interceptor.Chain chain)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • GzipRequestInterceptor

      GzipRequestInterceptor()
  • Method Details

    • intercept

      public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException
      Specified by:
      intercept in interface com.squareup.okhttp.Interceptor
      Throws:
      IOException
    • forceContentLength

      private com.squareup.okhttp.RequestBody forceContentLength(com.squareup.okhttp.RequestBody requestBody) throws IOException
      Throws:
      IOException
    • gzip

      private com.squareup.okhttp.RequestBody gzip(com.squareup.okhttp.RequestBody body)