Decode Compressed Response
Background ()
require 'zlib'
require 'stringio'
$server = start_sinatra_app do
get('/') {
content = 'The quick brown fox jumps over the lazy dog'
io = StringIO.new
writer = Zlib::GzipWriter.new(io)
writer << content
writer.close
headers['Content-Encoding'] = 'gzip'
io.string
}
end
require 'vcr'
VCR.configure do |c|
c.cassette_library_dir = 'cassettes'
c.hook_into :webmock
c.default_cassette_options = { :serialize_with => :syck }
endThe option is not set by default
The option is enabled
Last updated