def encode(request)
      return request if show_debug

      begin
        ostream = StringIO.new
        gzw = Zlib::GzipWriter.new(ostream)
        gzw.write(request)
        ostream.string
      ensure
        gzw.close
      end
    end
def encode(request)
      return request if show_debug

      begin
        ostream = StringIO.new
        gzw = Zlib::GzipWriter.new(ostream)
        gzw.write(request)
        ostream.string
      ensure
        gzw.close
      end
    end
encode gzip