Sha256: 2754e63c5c928c2ab3fd9a80fe7132160f3b053519a46de2e8e0172d92703a31
Contents?: true
Size: 485 Bytes
Versions: 68
Compression:
Stored size: 485 Bytes
Contents
require 'zlib' require 'stringio' module ZendeskAPI # @private module Middleware # @private module Response # Faraday middleware to handle content-encoding = gzip class Gzip < Faraday::Response::Middleware def on_complete(env) if !env[:body].strip.empty? && env[:response_headers]['content-encoding'] == "gzip" env[:body] = Zlib::GzipReader.new(StringIO.new(env[:body])).read end end end end end end
Version data entries
68 entries across 68 versions & 2 rubygems